summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-03-22 07:15:07 +0100
committerMartin Sustrik <sustrik@250bpm.com>2012-03-23 08:06:21 +0100
commit836ecfaf92c894eb36f8c41c8201607b68ef4185 (patch)
tree853655587a6e4b58e7bfdc04f04c118f6332bf04
parent0c99d04db9240f29493a4d774be677dc682547ca (diff)
Error handling during connect
Error handling of asynchronous connect for IPC was incorrectly copied from TCP transport. This patch fixes the problem. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
-rw-r--r--src/ipc_connecter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp
index 03ab97a..4ed7b2f 100644
--- a/src/ipc_connecter.cpp
+++ b/src/ipc_connecter.cpp
@@ -197,6 +197,12 @@ int xs::ipc_connecter_t::open ()
if (rc == 0)
return 0;
+ // Asynchronous connect was launched.
+ if (rc == -1 && errno == EINPROGRESS) {
+ errno = EAGAIN;
+ return -1;
+ }
+
// Forward the error.
return -1;
}