Skip to content
Permalink
Browse files
MDEV-17479 Assertion `mysql_socket.fd != -1' failed in inline_mysql_s…
…ocket_send on server shutdown

Do not try to write ER_SHUTDOWN error message to socket, when it is forcefully closed by the shutdown.
This will avoid the race condition (attempt to write to closed socket,  if connection shuts down by itself).
  • Loading branch information
vaintroub committed Jan 31, 2019
1 parent b8aef87 commit 20e19f6
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1791,7 +1791,7 @@ static void close_connections(void)
*/
THD* save_thd= current_thd;
set_current_thd(tmp);
close_connection(tmp,ER_SERVER_SHUTDOWN);
close_connection(tmp);
set_current_thd(save_thd);
}
#endif

0 comments on commit 20e19f6

Please sign in to comment.