iruka-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Iruka-devel] IMCOM and disconnection


From: Petr Klyushkin
Subject: [Iruka-devel] IMCOM and disconnection
Date: 31 Aug 2002 17:42:31 +0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (bok choi)

Hello!

I've just looked at IMCom's sources to see stuff related with
disconnection and have some words to say.

First, regarding IMCom.disconnect().  This function sends
'</stream:stream>' to server, sets 'running' flags for both self and
JCH to 0, and then explicitly closes sockets.  The problem is that it
doesn't wait ("join()") for JCH thread to terminate.  This may cause
problems to arise.

The proper way to my mind is just to send '</stream:stream>' to server
and do actual disconnection work in IMCom.handleDisconnected(), when
server returns '</stream:stream>' reply.  It can wait ("join()") for
JCH thread to terminate but I don't think it is nice because it can
block forever if server sends us something else before
'</stream:stream>'.

IMCom.handleDisconnected() should set 'running' flags to 0, close
sockets and call 'Disconnected' event handlers.

Aah! I've almost forgotten to say that IMCom.disconnect() should check
'running' flag(s) prior doing anything.

-- 
                                                             C'ya, Peter.
       address@hidden://petrk.pochtamt.ru]=--
        --=[ICQ 89449080]=--=[Jabber address@hidden

XMMS:  Eagles - Hotel California





reply via email to

[Prev in Thread] Current Thread [Next in Thread]