From 836ecfaf92c894eb36f8c41c8201607b68ef4185 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 22 Mar 2012 07:15:07 +0100 Subject: 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 --- src/ipc_connecter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- cgit v1.2.3