Skip to content

Commit

Permalink
when RemoveSession close HttpClient
Browse files Browse the repository at this point in the history
when RemoveSession close HttpClient
  • Loading branch information
JohnDoe117 authored and bogdanfinn committed Dec 8, 2023
1 parent ac86466 commit a4a3bed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cffi_src/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ var clients = make(map[string]tls_client.HttpClient)
func RemoveSession(sessionId string) {
clientsLock.Lock()
defer clientsLock.Unlock()
client, ok := clients[sessionId]
if !ok {
return
}
client.CloseIdleConnections()

delete(clients, sessionId)
}
Expand Down

0 comments on commit a4a3bed

Please sign in to comment.