File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ proc upgradeMonitor(
234
234
finally:
235
235
upgrades.release()
236
236
237
- proc accept_cleanup (upgrades: AsyncSemaphore, connection: Connection) {.async.} =
237
+ proc acceptCleanup (upgrades: AsyncSemaphore, connection: Connection) {.async.} =
238
238
upgrades.release() # always release the slot
239
239
if not isNil(connection):
240
240
await connection.close()
@@ -279,11 +279,12 @@ proc accept(s: Switch, transport: Transport) {.async.} = # noraises
279
279
trace "releasing semaphore on cancellation"
280
280
upgrades.release() # always release the slot
281
281
except TransportUseClosedError:
282
- await accept_cleanup(upgrades, conn)
282
+ trace "Graceful shutdown in accept loop, exiting"
283
+ await acceptCleanup(upgrades, conn)
283
284
return
284
285
except CatchableError as exc:
285
286
error "Exception in accept loop, exiting", exc = exc.msg
286
- await accept_cleanup (upgrades, conn)
287
+ await acceptCleanup (upgrades, conn)
287
288
return
288
289
289
290
proc stop*(s: Switch) {.async, public.} =
You can’t perform that action at this time.
0 commit comments