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)
98
+
break
99
+
end
100
+
end
101
+
end
60
102
61
103
# 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
104
socket.define_singleton_method:tokendo
@@ -67,11 +109,14 @@ def socket_accept(server)
67
109
socket.define_singleton_method:closedo
68
110
super()
69
111
ensure
70
-
Console.info(self,"Closing connection from #{address.inspect}",socket: socket)
112
+
Console.debug(self,"Releasing connection from #{address.inspect}",socket: socket)
0 commit comments