From 8aa48cd3f955e8e4360720aab6736a0b79a4eeae Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Tue, 13 Sep 2016 17:08:59 -0400 Subject: [PATCH] Reinstituted "standard" timeout-based disconnection, which only works for stall_frames==0 due to the fixes to not stall the UI. --- network/netplay/netplay.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/network/netplay/netplay.c b/network/netplay/netplay.c index 5849136258..0cf6653012 100644 --- a/network/netplay/netplay.c +++ b/network/netplay/netplay.c @@ -386,6 +386,9 @@ static int poll_input(netplay_t *netplay, bool block) RARCH_LOG("Network is stalling at frame %u, count %u of %d ...\n", netplay->self_frame_count, netplay->timeout_cnt, MAX_RETRIES); + + if (netplay->timeout_cnt >= MAX_RETRIES) + return -1; } while (had_input || (block && (netplay->read_frame_count <= netplay->self_frame_count))); return 0;