This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/starling/handler.rb b/lib/starling/handler.rb | |
index 4ab2960..1bde8ac 100644 | |
--- a/lib/starling/handler.rb | |
+++ b/lib/starling/handler.rb | |
@@ -56,6 +56,7 @@ STAT queue_%s_age %d\r\n".freeze | |
SHUTDOWN_COMMAND = /\Ashutdown\r\n/m | |
+ QUIT_COMMAND = /\Aquit\r\n/m | |
@@next_session_id = 1 | |
@@ -126,6 +127,9 @@ STAT queue_%s_age %d\r\n".freeze | |
Runner::shutdown | |
when DELETE_COMMAND | |
delete $1 | |
+ when QUIT_COMMAND | |
+ # ignore the command, client is closing connection. | |
+ return nil | |
else | |
logger.warn "Unknown command: #{data}." | |
respond ERR_UNKNOWN_COMMAND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment