Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/NetMQ/Core/Transports/Tcp/TcpConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,18 @@ public void OutCompleted(SocketError socketError, int bytesTransferred)
m_ioObject.RemoveSocket(m_s);
m_handleValid = false;

try {
try
{
m_s.NoDelay = true;
} catch (ArgumentException) {
}
catch (ArgumentException)
{
// OSX sometime fail while the socket is still connecting
}
catch (SocketException ex) when (ex.SocketErrorCode == SocketError.InvalidArgument)
{
// macOS may report EINVAL here while the socket is still connecting.
}

// As long as the TCP keep-alive option is not -1 (indicating no change),
if (m_options.TcpKeepalive != -1)
Expand Down
Loading