makamaka / AnyEvent-PocketIO-Client

6 stars 2 forks source link

not handling disconnect #2

Open bluet opened 11 years ago

bluet commented 11 years ago

The client did nothing when server offline.

There's no way to set a callback when connection error.

I want it to reconnect when disconnected from server, anything I can do?

bluet commented 11 years ago

I use $socket->on( 'disconnect') and $socket->{conn}->on('disconnect'), both of them didn't triggered when I shutdown my PocketIO server.

bluet commented 11 years ago

seems that the only way to know when disconnected is setting $socket->{_client}->{handle}->{handle}->on_error (sub {say 'error'} ); and it's kinda ugly.... Any idea? BTW, are you using this module by yourself? How do you handle these kind of problem?