kerimamansaryyev / dart_pusher_channels

MIT License
44 stars 11 forks source link

Socket not reconnct after disconnect #54

Open kururu-abdo opened 1 week ago

kururu-abdo commented 1 week ago

when i logged out i used to disconnect the socket. but after login again socket not reconnect. despite i call connect() function on initState.

//this my logout function

`void logout() {

try {unsubscribePresnceChannels();

unsubscribeHomeChannels(); disconnect(); dispose(); } catch (e) { log("LOGOUT ERROR $e"); }

}`

kerimamansaryyev commented 6 days ago

The code is very hard to understand without a context. I can't say what's the problem there because not enough of data was provided. I would assume that you try connecting the same instance of client after disposing it, instead, you need to instantiate a new client if you disposed of the existing one.

Try adding more context to the issue, provide more code, error logs, try describing the steps that caused the problem in more details.