From 8c304dfda76bf1930aee18fbcae19fd570aad124 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Sat, 21 Jan 2017 13:18:31 -0500 Subject: [PATCH] Make the client send an INFO even if it's wrong This simply gives the server a reason why the client disconnected, rather than a generic, unexplained disconnection. --- network/netplay/netplay_handshake.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/network/netplay/netplay_handshake.c b/network/netplay/netplay_handshake.c index 79f7dded10..b75b332010 100644 --- a/network/netplay/netplay_handshake.c +++ b/network/netplay/netplay_handshake.c @@ -832,6 +832,15 @@ error: RARCH_ERR("%s\n", dmsg); runloop_msg_queue_push(dmsg, 1, 180, false); } + + if (!netplay->is_server) + { + /* Counter-intuitively, we still want to send our info. This is simply so + * that the server knows why we disconnected. */ + if (!netplay_handshake_info(netplay, connection)) + return false; + } + return false; } /**