Skip to content

Commit 3f543b5

Browse files
committed
Delete pending requests upon disconnect
Signed-off-by: Lorenzo Donini <[email protected]>
1 parent 0c9d005 commit 3f543b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ocppj/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func (s *Server) Start(listenPort int, listenPath string) {
7373
}
7474
})
7575
s.server.SetDisconnectedClientHandler(func(ws ws.Channel) {
76+
delete(s.clientPendingMessages, ws.GetID())
7677
if s.disconnectedClientHandler != nil {
7778
s.disconnectedClientHandler(ws.GetID())
7879
}

0 commit comments

Comments
 (0)