Browse Source

[master] Merge branch 'trac5336'

Marcin Siodelski 7 years ago
parent
commit
db251cb66a
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/lib/asiolink/unix_domain_socket.cc

+ 6 - 2
src/lib/asiolink/unix_domain_socket.cc

@@ -213,8 +213,10 @@ UnixDomainSocketImpl::sendHandler(const UnixDomainSocket::Handler& remote_handle
     if ((ec.value() == boost::asio::error::would_block) ||
     if ((ec.value() == boost::asio::error::would_block) ||
         (ec.value() == boost::asio::error::try_again)) {
         (ec.value() == boost::asio::error::try_again)) {
         doSend(buffer, remote_handler);
         doSend(buffer, remote_handler);
+
+    } else {
+        remote_handler(ec, length);
     }
     }
-    remote_handler(ec, length);
 }
 }
 
 
 void
 void
@@ -246,8 +248,10 @@ UnixDomainSocketImpl::receiveHandler(const UnixDomainSocket::Handler& remote_han
     if ((ec.value() == boost::asio::error::would_block) ||
     if ((ec.value() == boost::asio::error::would_block) ||
         (ec.value() == boost::asio::error::try_again)) {
         (ec.value() == boost::asio::error::try_again)) {
         doReceive(buffer, remote_handler);
         doReceive(buffer, remote_handler);
+
+    } else {
+        remote_handler(ec, length);
     }
     }
-    remote_handler(ec, length);
 }
 }
 
 
 void
 void