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)
94
+
break
95
+
end
96
+
end
97
+
end
60
98
61
99
# 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
100
socket.define_singleton_method:tokendo
@@ -67,11 +105,14 @@ def socket_accept(server)
67
105
socket.define_singleton_method:closedo
68
106
super()
69
107
ensure
70
-
Console.info(self,"Closing connection from #{address.inspect}",socket: socket)
108
+
Console.debug(self,"Releasing connection from #{address.inspect}",socket: socket)
0 commit comments