Skip to content

Commit 74159da

Browse files
seanmcevoybenoitc
authored andcommitted
fix check_out cancel (#540)
fix #541
1 parent a3a0169 commit 74159da

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/hackney_pool.erl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
queues = dict:new(), % Dest => queue of Froms,
5252
pending = dict:new(),
5353
connections = dict:new(),
54-
sockets = dict:new(),
55-
nb_waiters=0}).
54+
sockets = dict:new()}).
5655

5756

5857
start() ->
@@ -322,7 +321,7 @@ handle_cast({checkout_cancel, Dest, Ref}, State) ->
322321
case Removed of
323322
true ->
324323
Pending2 = del_pending(Ref, Pending),
325-
{noreply, State#state{queues=Queues2, nb_waiters=Pending2}};
324+
{noreply, State#state{queues=Queues2, pending=Pending2}};
326325
false ->
327326
% we leak the socket here but 'DOWN' will mop up for us when it times out
328327
{noreply, dequeue(Dest, Ref, State)}

0 commit comments

Comments
 (0)