Skip to content

Commit

Permalink
Abort all clients requests when they disconnect.
Browse files Browse the repository at this point in the history
  • Loading branch information
saul-jb committed Apr 11, 2024
1 parent 64452e5 commit 71ca7ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/rpc/src/rpc-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export class RPCServer {
stream.end()
socket.destroy()

for (const controller of controllers.values()) {
controller.abort()
}

this.clients.delete(id)
})
}
Expand Down

0 comments on commit 71ca7ed

Please sign in to comment.