-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Description
Hi,
I believe the idle connection count is incremented incorrectly in module Network.HTTP.Client.Manager
function putSocket
line 156.
The code currently is
let (l', mx) = addToList now (mMaxConns man) ci l
cnt' = idleCount + maybe 0 (const 1) mx
m' = ManagerOpen cnt' (Map.insert key l' m)
Since addToList
returns Nothing
if the connection was added to the idle pool and Just ci
if the connection was not added (and has to be closed) the constants 0
and 1
should probably be reversed and the line should read:
cnt' = idleCount + maybe 1 (const 0) mx
What do you think?
Metadata
Metadata
Assignees
Labels
No labels