always cleanup connection on exit

This commit is contained in:
Dmitriy Ryajov 2019-09-27 07:24:59 -06:00
parent c7606ce2eb
commit cc2072d290
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ proc start*(s: Switch): Future[seq[Future[void]]] {.async, gcsafe.} =
proc handle(conn: Connection): Future[void] {.async, closure, gcsafe.} =
try:
await s.upgradeIncoming(conn) # perform upgrade on incoming connection
except:
finally:
await s.cleanupConn(conn)
var startFuts: seq[Future[void]]