Skip to content

Commit

Permalink
Netplay: Increase retry/timeout delay before dropping connection when…
Browse files Browse the repository at this point in the history
… data can't be sent

Fixes disconnections right after connecting when ping times are relatively high
  • Loading branch information
SourMesen committed Aug 9, 2024
1 parent d4501b7 commit cae3dc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Utilities/Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ bool WouldBlock(int nError)

int Socket::Send(char *buf, int len, int flags)
{
int retryCount = 15;
int retryCount = 100;
int nError = 0;
int returnVal;
do {
Expand All @@ -235,7 +235,7 @@ int Socket::Send(char *buf, int len, int flags)
return 0;
}

std::this_thread::sleep_for(std::chrono::duration<int, std::milli>(10));
std::this_thread::sleep_for(std::chrono::duration<int, std::milli>(20));
}
}
}
Expand Down

0 comments on commit cae3dc7

Please sign in to comment.