소스 검색

Fixed EWOULDBLOCK errno on Windows

Paul-Louis Ageneau 5 년 전
부모
커밋
ad676815bd
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/tcptransport.cpp

+ 2 - 1
src/tcptransport.cpp

@@ -21,6 +21,7 @@
 #if RTC_ENABLE_WEBSOCKET
 
 #include <exception>
+
 #ifndef _WIN32
 #include <fcntl.h>
 #include <unistd.h>
@@ -278,7 +279,7 @@ bool TcpTransport::trySendMessage(message_ptr &message) {
 #endif
 		int len = ::send(mSock, data, int(size), flags);
 		if (len < 0) {
-			if (errno == EAGAIN || errno == EWOULDBLOCK) {
+			if (sockerrno == EAGAIN || sockerrno == EWOULDBLOCK) {
 				message = make_message(message->end() - size, message->end());
 				return false;
 			} else {