diff --git a/src/guacd/user.c b/src/guacd/user.c index ad092246..0a371477 100644 --- a/src/guacd/user.c +++ b/src/guacd/user.c @@ -102,6 +102,10 @@ int guacd_user_start(guac_parser* parser, guac_user* user) { /* Wait for I/O threads */ pthread_join(input_thread, NULL); + /* Explicitly signal disconnect */ + guac_protocol_send_disconnect(user->socket); + guac_socket_flush(user->socket); + /* Done */ return 0;