luisllamasbinaburo / EwelinkNET

eWeLink API for .NET Standard (Windows, Linux and Mac)
https://www.luisllamas.es
Apache License 2.0
35 stars 9 forks source link

make websocket reconnect when needed by updating its internal IsConne… #3

Closed CristianT closed 1 year ago

CristianT commented 4 years ago

I was experimenting disconnections of the websocket when running the library in a server for a long time, probably due to timeout. The websocket doesn't recover from that. I hoocked the events OnClose and OnError to update the internal IsConnected state an therefore be able to use the same client over long periods.