Closed PhillippOhlandt closed 3 years ago
Hi hi :wave:
Good catch! We totally missed this in testing.
@impl Slipstream
def handle_disconnect({:error, {:connect_failure, %{status_code: 403}}}, socket) do
# try reconnecting or stop the GenServer...
{:stop, :shutdown, socket}
end
I like the idea of a c:Slipstream.handle_reject/2
callback though, I'll keep that in mind.
This should be released as v0.7.0, but 0.7.0 also has a breaking change with how leaves are handled. Once #37 is merged the CHANGELOG should have everything you need to adjust your code if you use Slipstream.leave/2
anywhere.
Thanks for the report!
Hello,
when I connect to a socket that rejects the connection in the sockets
connect
function, i get a gun errorand the slipstream
handle_disconnect
callback is called several seconds (10 or more) later with the reason:closed_by_remote
.Proper handling via the
handle_disconnect
or maybe a newhandle_reject
callback would be nice.