SF.net SVN: fclient: [407] trunk/sandbox/fcp2/client.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-06-28 08:13:29
|
Revision: 407
http://fclient.svn.sourceforge.net/fclient/?rev=407&view=rev
Author: jUrner
Date: 2008-06-28 01:13:38 -0700 (Sat, 28 Jun 2008)
Log Message:
-----------
ClientDisconnected() was not triggered when the client was already closed. fixed
Modified Paths:
--------------
trunk/sandbox/fcp2/client.py
Modified: trunk/sandbox/fcp2/client.py
===================================================================
--- trunk/sandbox/fcp2/client.py 2008-06-28 07:58:02 UTC (rev 406)
+++ trunk/sandbox/fcp2/client.py 2008-06-28 08:13:38 UTC (rev 407)
@@ -295,6 +295,8 @@
@param msg: message to pass to the ClientDisconnected event or None to not inform listeners
@todo: complain if the client is already closed?
+ @todo: trigger ClientDisconnected() if the client is already closed? should be yes. otherwise
+ we'd have to distinguish between intentional and unintentional closing like on a broken io
"""
consts.Logger.Client.info(consts.LogMessages.Closing)
@@ -306,12 +308,11 @@
self._ddaTests = []
self._requests = {}
- #TODO: complain if we are already closed?
+ if msg is not None:
+ self.events.ClientDisconnected(msg)
if self.ioHandler.isOpen():
self.ioHandler.close()
- if msg is not None:
- self.events.ClientDisconnected(msg)
-
+
#TODO: check if this method is still needed
def _finalizeRequest(self, msg, request, event):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|