mirror of
https://github.com/fluencelabs/redis
synced 2025-06-16 10:41:22 +00:00
Lua debugger: clear end of session protocol.
When the debugger exits now it produces an <endsession> tag that informs redis-cli (or other debugging clients) that the session terminated. This way the client knows there is yet another reply to read (the one of the EVAL script itself), and can switch to non-debugging mode ASAP.
This commit is contained in:
@ -1593,6 +1593,10 @@ int ldbStartSession(client *c) {
|
||||
/* End a debugging session after the EVAL call with debugging enabled
|
||||
* returned. */
|
||||
void ldbEndSession(client *c) {
|
||||
/* Emit the remaining logs and an <endsession> mark. */
|
||||
ldbLog(sdsnew("<endsession>"));
|
||||
ldbSendLogs();
|
||||
|
||||
/* If it's a fork()ed session, we just exit. */
|
||||
if (ldb.forked) {
|
||||
writeToClient(c->fd, c, 0);
|
||||
|
Reference in New Issue
Block a user