From: Martin S. <ms...@10...> - 2008-07-24 07:31:56
|
Hi, to fix my problems with the timeouts and connection loss. I print out every unhandled event. As my 9 clients gets disconnected from the zookeeper server they print out the following event -1,0,'null (from event.toString()). In this the events were thrown endless. I found the following documentation for this event. * When a client drops current connection and re-connects to a server, all the * existing watches are considered as being triggered but the undelivered events * are lost. To emulate this, the client will generate a special event to tell * the event handler a connection has been dropped. This special event has type * EventNone and state sKeeperStateDisconnected. What I need to know is: Do we have to reconnect or does it happen by its own? What should the handler do if this event gets thrown? Thank you. Martin |