Commit ac64b29b authored by Nick Craver's avatar Nick Craver

Sockets: disable NoLinger

This is likely causing some fail as we're not sure everything has been sent. If we *can* be sure, it'd be safe to close it early, otherwise we need to eat the TIME_WAIT.

Buuuuuuut now that I think about it. Linger only works inherently *when there's data left to write*. If our data is *in the pipe* and not yet *in the socket buffer*, we'd be killing it early. This may explain several failures, especially inconsistent and under-load ones.

We really need to figure out how to best close the socket *when the pipe is done* in the Dispose() case. /cc @mgravell
parent afe383f3
......@@ -133,7 +133,7 @@ internal static Socket CreateSocket(EndPoint endpoint)
var protocolType = addressFamily == AddressFamily.Unix ? ProtocolType.Unspecified : ProtocolType.Tcp;
var socket = new Socket(addressFamily, SocketType.Stream, protocolType);
SocketConnection.SetRecommendedClientOptions(socket);
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger, false);
//socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger, false);
return socket;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment