mirror of
https://github.com/seriyps/mtproto_proxy.git
synced 2026-08-04 15:19:47 +00:00
Better handling of down connection termination
This commit is contained in:
parent
dd8a8d48ef
commit
88dddb5ed4
1 changed files with 7 additions and 2 deletions
|
|
@ -270,8 +270,13 @@ ds_get(St) ->
|
|||
-spec ds_return(downstream(), ds_store()) -> ds_store().
|
||||
ds_return(Pid, St) ->
|
||||
%% It may return 'undefined' if down_conn crashed
|
||||
{ok, St1} = pid_psq:dec_priority(Pid, St),
|
||||
St1.
|
||||
case pid_psq:dec_priority(Pid, St) of
|
||||
{ok, St1} ->
|
||||
St1;
|
||||
undefined ->
|
||||
lager:warning("Attempt to release unknown connection ~p", [Pid]),
|
||||
St
|
||||
end.
|
||||
|
||||
-spec ds_remove(downstream(), ds_store()) -> ds_store().
|
||||
ds_remove(Downstream, St) ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue