You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be nice to have a quick way to detect when the network connection disappears unexpectedly. I'm thinking some kind of inactivity timeout that is renewed every time we receive data from the server. When the inactivity timeout is exceeded, a ping should be sent. If the ping times out the GenServer should be stopped.
Not sure how best to implement. Could it be another process that has something like:
# some other module ?defactivity_monitorreceivedo:refresh->activity_monitorafter5_000->Gnat.ping_or_stop_async(state.gnat)endend# Gnat moduledefhandle_info({:tcp,socket,data},%{socket: socket,parser: parser}=state)do...ActivityMonitor.call(state.activity_monitor,:refresh)...end
I know that is not a fully fleshed out idea, but I think it's enough to understand how I'm thinking about implementing it.
The text was updated successfully, but these errors were encountered:
I think it would be nice to have a quick way to detect when the network connection disappears unexpectedly. I'm thinking some kind of inactivity timeout that is renewed every time we receive data from the server. When the inactivity timeout is exceeded, a ping should be sent. If the ping times out the GenServer should be stopped.
Not sure how best to implement. Could it be another process that has something like:
I know that is not a fully fleshed out idea, but I think it's enough to understand how I'm thinking about implementing it.
The text was updated successfully, but these errors were encountered: