If we request shutdown from a client on a different thread than a blocking lua script we fail to actually shutdown until the script completes

Former-commit-id: 1ca6c1dd56
This commit is contained in:
John Sully committed 2020-05-24 01:56:23 -04:00
1 parent aaff167eb9
commit dde860c60b
1 file changed
+5
+5
View File
@@ -3473,7 +3473,12 @@ void processEventsWhileBlocked(int iel) {
AeLocker locker;
locker.arm(nullptr);
locker.release();
for (client *c : vecclients)
c->lock.lock();
// If a different thread processed the shutdown we need to abort the lua command or we will hang
if (serverTL->el->stop)
throw ShutdownException();
}