ninenines / gun

HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP.
ISC License
891 stars 232 forks source link

case_clause 'closed' is missing in gun_ws.erl #184

Closed nomadec closed 5 years ago

nomadec commented 5 years ago

hi there, it seems that case_clause 'closed' is missing in gun_ws.erl this happens when the websocket connection is closed by a server that we are connected to using Gun. below is a report for your reference:

=SUPERVISOR REPORT==== 28-Dec-2018::14:07:37 === Supervisor: {local,gun_sup} Context: child_terminated Reason: {{case_clause,closed}, [{gun_ws,close,2, [{file,"c:/.../_build/default/lib/gun/src/gun_ws.erl"}, {line,135}]}, {gun,disconnect,2, [{file,"c:/.../_build/default/lib/gun/src/gun.erl"}, {line,884}]}, {gen_statem,call_state_function,5, [{file,"gen_statem.erl"},{line,1240}]}, {gen_statem,loop_event,6, [{file,"gen_statem.erl"},{line,1012}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,247}]}]} Offender: [{pid,<0.997.0>}, {id,gun}, {mfargs,{gun,start_link,undefined}}, {restart_type,temporary}, {shutdown,5000}, {child_type,worker}]

essen commented 5 years ago

There's most definitely things not working right in the master branch, thanks! I would advise either staying on 1.3 or sending PRs to help me fix everything quicker.

essen commented 5 years ago

Fixed locally. Thanks!