Fix crash to TCP server (WIN32).

This commit is contained in:
carlo-bramini 2017-12-13 20:08:42 +01:00
parent 15a2cc793a
commit 46733af348
2 changed files with 4 additions and 2 deletions

View file

@ -736,7 +736,7 @@ int main(int argc, char** argv)
cleanup: cleanup:
#if !defined(MACINTOSH) && !defined(WIN32) #if !defined(MACINTOSH)
if (server != NULL) { if (server != NULL) {
/* if the user typed 'quit' in the shell, kill the server */ /* if the user typed 'quit' in the shell, kill the server */
if (!interactive) { if (!interactive) {

View file

@ -1161,8 +1161,10 @@ void delete_fluid_server_socket(fluid_server_socket_t *server_socket)
if (server_socket->socket != INVALID_SOCKET) if (server_socket->socket != INVALID_SOCKET)
fluid_socket_close (server_socket->socket); fluid_socket_close (server_socket->socket);
if (server_socket->thread) if (server_socket->thread) {
fluid_thread_join(server_socket->thread);
delete_fluid_thread (server_socket->thread); delete_fluid_thread (server_socket->thread);
}
FLUID_FREE (server_socket); FLUID_FREE (server_socket);