Browse Source

Second fix for EWOULDBLOCK on Windows

Paul-Louis Ageneau 5 years ago
parent
commit
642d304af9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/tcptransport.cpp

+ 1 - 1
src/tcptransport.cpp

@@ -336,7 +336,7 @@ void TcpTransport::runLoop() {
 				char buffer[bufferSize];
 				int len = ::recv(mSock, buffer, bufferSize, 0);
 				if (len < 0) {
-					if (errno == EAGAIN || errno == EWOULDBLOCK) {
+					if (sockerrno == EAGAIN || sockerrno == EWOULDBLOCK) {
 						continue;
 					} else {
 						throw std::runtime_error("Connection lost");