You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2014/09/02 11:01:26 UTC
svn commit: r1621949 -
/qpid/proton/branches/examples/tutorial/proton_events.py
Author: gsim
Date: Tue Sep 2 09:01:26 2014
New Revision: 1621949
URL: http://svn.apache.org/r1621949
Log:
refactor logic for better readability
Modified:
qpid/proton/branches/examples/tutorial/proton_events.py
Modified: qpid/proton/branches/examples/tutorial/proton_events.py
URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/tutorial/proton_events.py?rev=1621949&r1=1621948&r2=1621949&view=diff
==============================================================================
--- qpid/proton/branches/examples/tutorial/proton_events.py (original)
+++ qpid/proton/branches/examples/tutorial/proton_events.py Tue Sep 2 09:01:26 2014
@@ -127,11 +127,10 @@ class Selectable(object):
data = self.socket.recv(c)
if data:
self.transport.push(data)
- elif self._closed_cleanly():
- self.transport.close_tail()
else:
- self.read_done = True
- self.write_done = True
+ if not self._closed_cleanly():
+ self.read_done = True
+ self.write_done = True
self.transport.close_tail()
except TransportException, e:
print "Error on read: %s" % e
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org