diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-03-22 07:15:07 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-03-23 08:06:21 +0100 |
commit | 836ecfaf92c894eb36f8c41c8201607b68ef4185 (patch) | |
tree | 853655587a6e4b58e7bfdc04f04c118f6332bf04 /src | |
parent | 0c99d04db9240f29493a4d774be677dc682547ca (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>
Diffstat (limited to 'src')
-rw-r--r-- | src/ipc_connecter.cpp | 6 |
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; } |