Skip to content

Commit

Permalink
support Memcached QUIT command
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham authored and mojodna committed Nov 15, 2008
1 parent 1829624 commit 4a19953
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/starling/handler.rb
Expand Up @@ -56,6 +56,7 @@ class Handler < EventMachine::Connection

SHUTDOWN_COMMAND = /\Ashutdown\r\n/m

QUIT_COMMAND = /\Aquit\r\n/m

@@next_session_id = 1

Expand Down Expand Up @@ -126,6 +127,9 @@ def process(data)
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
Expand Down

0 comments on commit 4a19953

Please sign in to comment.