Commit 20e19f69 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-17479 Assertion `mysql_socket.fd != -1' failed in inline_mysql_socket_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).
parent b8aef872
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment