You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure we don't hang in Socket#accept due to spurious readiness.
It's possible, especially on dual stack, to have issues where a server
may become readable, but by the time accept is called, the connection is
gone. This can cause a deadlock between the semaphore and the accept call,
which can hang indefinitely.
# Keeping the connection alive here is problematic because if the next request is slow, it will "block the server" since we have relinquished the token already.
Console.debug(self,"Accepted connection from #{address.inspect}",socket: socket)
96
+
break
97
+
end
98
+
end
99
+
end
60
100
61
101
# Provide access to the token, so that the connection limit could be released prematurely if it is determined that the request will not overload the server:
62
102
socket.define_singleton_method:tokendo
@@ -67,11 +107,14 @@ def socket_accept(server)
67
107
socket.define_singleton_method:closedo
68
108
super()
69
109
ensure
70
-
Console.info(self,"Closing connection from #{address.inspect}",socket: socket)
110
+
Console.debug(self,"Releasing connection from #{address.inspect}",socket: socket)
0 commit comments