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
# Servers.jlfunctionlistenloop(f, listener, conns, tcpisvalid,
max_connections, readtimeout, access_log, ready_to_accept, verbose)
sem = Base.Semaphore(max_connections)
...whileisopen(listener)
try
Base.acquire(sem)
io =accept(listener)
if io ===nothing@warnv1"unable to accept new connection"continueelseif!tcpisvalid(io)
@warnv1"!tcpisvalid: $io"close(io)
continueend
conn =Connection(io)
...
There is no Base.release(sem) before continue in the case when something wrong happens when calling accept. As a result, after each continue, semaphore max value decreases.
The text was updated successfully, but these errors were encountered:
bountyHntr
changed the title
Missed semaphore release after failed accept
Missed semaphore Base.release(sem) after failed acceptFeb 9, 2024
There is no
Base.release(sem)
beforecontinue
in the case when something wrong happens when callingaccept
. As a result, after eachcontinue
, semaphore max value decreases.The text was updated successfully, but these errors were encountered: