The listener DCB is now properly closed instead of just being removed from the poll set.
This commit is contained in:
Markus Makela
2015-06-21 12:51:54 +03:00
parent 79c20bfae8
commit e14b29baf9
5 changed files with 23 additions and 14 deletions

View File

@ -1771,7 +1771,7 @@ gw_client_close(DCB *dcb)
dcb->state == DCB_STATE_NOPOLLING ||
dcb->state == DCB_STATE_ZOMBIE)
{
if (!DCB_IS_CLONE(dcb)) CHK_PROTOCOL(protocol);
if (!DCB_IS_CLONE(dcb) && protocol) CHK_PROTOCOL(protocol);
}
#endif
LOGIF(LD, (skygw_log_write(LOGFILE_DEBUG,

View File

@ -128,7 +128,10 @@ void mysql_protocol_done (
MySQLProtocol* p;
server_command_t* scmd;
server_command_t* scmd2;
if(dcb->protocol == NULL)
return;
p = (MySQLProtocol *)dcb->protocol;
spinlock_acquire(&p->protocol_lock);