{gun_down, ConnPid, Protocol, Reason, KilledStreams}
ConnPid :: pid()
Protocol :: http | http2 | socks | ws
Reason :: any()
KilledStreams :: [gun:stream_ref()]gun_down - The connection is down
{gun_down, ConnPid, Protocol, Reason, KilledStreams}
ConnPid :: pid()
Protocol :: http | http2 | socks | ws
Reason :: any()
KilledStreams :: [gun:stream_ref()]The connection is down.
This message informs the owner process that the connection
was lost. Depending on the retry and retry_timeout
options Gun may automatically attempt to reconnect.
When the connection goes back up, Gun will not attempt to retry requests. It will also not upgrade to Websocket automatically if that was the protocol in use when the connection was lost.
The pid of the Gun connection process.
The protocol that was selected for this connection or upgraded to during the course of the connection.
The reason for the loss of the connection.
It is present for debugging purposes only. You should not rely on this value to perform operations programmatically.
List of streams that have been brutally terminated.
They are active streams that did not complete before the closing of the connection. Whether they can be retried safely depends on the protocol used and the idempotence property of the requests.
2.0: The last element of the message’s tuple, UnprocessedStreams
has been removed.
1.0: Message introduced.
handle_info({gun_down, ConnPid, _Protocol, _Reason, _Killed}, State=#state{conn_pid=ConnPid}) -> %% Do something. {noreply, State}.