From ef59e2858beb08e9bb8282b7bdc49a6eed420b1a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 30 Nov 2018 00:33:48 -0800 Subject: [PATCH] Fix incorrect error message on STUN receive timeout --- mist/stun.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mist/stun.cpp b/mist/stun.cpp index 0d57e8e..e17e382 100644 --- a/mist/stun.cpp +++ b/mist/stun.cpp @@ -112,7 +112,7 @@ bool getExternalAddressPortIP4(int proto, unsigned short localPort, PSOCKADDR_IN timeout = 1; } - bytesRead = SOCKET_ERROR; + bytesRead = 0; for (i = 0; i < tries; i++) { // Retransmit the request every second until the timeout elapses if (send(sock, (char *)&reqMsg, sizeof(reqMsg), 0) == SOCKET_ERROR) {