Fix a logic bug with handling quits after the cleanup.

This commit is contained in:
Vlad Grigorescu 2014-10-31 16:24:48 -04:00
parent 119ad59b70
commit c601ebccb8

View file

@ -71,14 +71,11 @@ event mysql_command_request(c: connection, command: count, arg: string) &priorit
event mysql_command_request(c: connection, command: count, arg: string) &priority=-5
{
if ( !c?$mysql )
if ( c?$mysql && c$mysql?$cmd && c$mysql$cmd == "quit" )
{
if ( command == 1 )
{
# We get no response for quits, so let's just log it now.
Log::write(mysql::LOG, c$mysql);
delete c$mysql;
}
# We get no response for quits, so let's just log it now.
Log::write(mysql::LOG, c$mysql);
delete c$mysql;
}
}