Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Jan 25, 2024
1 parent 3c4a485 commit 45432b9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/hyperx/client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,13 @@ proc responseDispatcher(client: ClientContext) {.async.} =
if client.isConnected:
await client.sendGoAway(err.code)
raise err
except ConnectionClosedError, QueueClosedError:
except ConnectionClosedError as err:
if client.isConnected:
raise getCurrentException()
raise err
else:
debugInfo "not connected"
except QueueClosedError:
doAssert not client.isConnected
except Exception as err:
debugInfo err.msg
raise err
Expand Down Expand Up @@ -496,11 +498,13 @@ proc recvTask(client: ClientContext) {.async.} =
raise (ref InternalOSError)(msg: err.msg)
else:
debugInfo "not connected"
except ConnectionClosedError, QueueClosedError:
except ConnectionClosedError as err:
if client.isConnected:
raise getCurrentException()
raise err
else:
debugInfo "not connected"
except QueueClosedError:
doAssert not client.isConnected
except Exception as err:
debugInfo err.msg
raise err
Expand Down

0 comments on commit 45432b9

Please sign in to comment.