[Libwebsockets] new ws timeout on sleep
per at bothner.com
Sat Nov 28 22:24:10 CET 2020
On 11/28/20 2:56 AM, Andy Green wrote:
> I added the remaining missing bits on main and that help it understand that losing the default route on another network interface (which was what happened with the suspend) shouldn't have any impact on connections that use a different source address than the interface had whose route was unaffected by the suspend.
> Hopefully that'll make things act well for connections going out externally (which should be cut off by loss of the default route under this scheme) and on lo (which should stay up).
Since it was mostly working, I finished support for reconnecting
after an unexpected WS connection close. For one, I gather from your response
that it might be necessary when doing non-localhost connections.
(While the "remote connection" approach I'm focusing on uses ssh for remoting
and ws only locally, I also support another mode where we might be doing https
and websockets to connect "directly" to a remote site.)
I then updated libwebsockets to test your recent change, and it seems to work:
The websocket connection persists after sleep+resume. (I.e. the reconnect
logic is not triggered.) Yeah!
per at bothner.com http://per.bothner.com/
More information about the Libwebsockets