Browse Source

Renamed socket errno constants

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

+ 2 - 2
src/tcptransport.cpp

@@ -279,7 +279,7 @@ bool TcpTransport::trySendMessage(message_ptr &message) {
 #endif
 #endif
 		int len = ::send(mSock, data, int(size), flags);
 		int len = ::send(mSock, data, int(size), flags);
 		if (len < 0) {
 		if (len < 0) {
-			if (sockerrno == EAGAIN || sockerrno == EWOULDBLOCK) {
+			if (sockerrno == SEAGAIN || sockerrno == SEWOULDBLOCK) {
 				message = make_message(message->end() - size, message->end());
 				message = make_message(message->end() - size, message->end());
 				return false;
 				return false;
 			} else {
 			} else {
@@ -336,7 +336,7 @@ void TcpTransport::runLoop() {
 				char buffer[bufferSize];
 				char buffer[bufferSize];
 				int len = ::recv(mSock, buffer, bufferSize, 0);
 				int len = ::recv(mSock, buffer, bufferSize, 0);
 				if (len < 0) {
 				if (len < 0) {
-					if (sockerrno == EAGAIN || sockerrno == EWOULDBLOCK) {
+					if (sockerrno == SEAGAIN || sockerrno == SEWOULDBLOCK) {
 						continue;
 						continue;
 					} else {
 					} else {
 						throw std::runtime_error("Connection lost");
 						throw std::runtime_error("Connection lost");