From ffecef901a140089f4ab55a815b052adf25895a5 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Tue, 13 Aug 2019 10:49:11 -0700 Subject: [PATCH] fix #99 / Connect error descriptions are invalid --- ixwebsocket/IXSocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ixwebsocket/IXSocket.cpp b/ixwebsocket/IXSocket.cpp index b4982b41..27bd8128 100644 --- a/ixwebsocket/IXSocket.cpp +++ b/ixwebsocket/IXSocket.cpp @@ -128,6 +128,10 @@ namespace ix optval != 0) { pollResult = PollResultType::Error; + + // set errno to optval so that external callers can have an + // appropriate error description when calling strerror + errno = optval; } #endif }