summaryrefslogtreecommitdiff
path: root/src/system/EventPipe.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/system/EventPipe.cxx')
-rw-r--r--src/system/EventPipe.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/system/EventPipe.cxx b/src/system/EventPipe.cxx
index 177e55347..e56534e2a 100644
--- a/src/system/EventPipe.cxx
+++ b/src/system/EventPipe.cxx
@@ -113,12 +113,14 @@ PoorSocketPair(int fd[2])
throw MakeSocketError("Failed to listen on socket");
UniqueSocketDescriptor socket0;
- if (!socket0.CreateNonBlock(AF_INET, SOCK_STREAM, IPPROTO_TCP))
+ if (!socket0.Create(AF_INET, SOCK_STREAM, IPPROTO_TCP))
throw MakeSocketError("Failed to create socket");
if (!socket0.Connect(listen_socket.GetLocalAddress()))
throw MakeSocketError("Failed to connect socket");
+ socket0.SetNonBlocking();
+
auto socket1 = listen_socket.AcceptNonBlock();
if (!socket1.IsDefined())
throw MakeSocketError("Failed to accept connection");