Modified:
/trunk/examples/networking/stacklesssocket.py
=======================================
--- /trunk/examples/networking/stacklesssocket.py Thu Jan 6 18:59:06 2011
+++ /trunk/examples/networking/stacklesssocket.py Thu Jan 6 20:10:50 2011
@@ -37,7 +37,7 @@
# internal version of this module in use at CCP Games.
#
-import stackless
+import stackless #, logging
import asyncore, weakref, time, select, types, sys, gc
from collections import deque
@@ -678,15 +678,16 @@
result = self.socket.send(data, flags)
return result
except stdsocket.error, why:
+ # logging.root.exception("SOME SEND ERROR")
if why.args[0] == EWOULDBLOCK:
return 0
- elif why.args[0] in (ECONNRESET, ENOTCONN, ESHUTDOWN,
ECONNABORTED):
- # Ensure the sender appears to have directly
received this exception.
- channel.send_exception(why.__class__, *why.args)
+
+ # Ensure the sender appears to have directly received
this exception.
+ channel.send_exception(why.__class__, *why.args)
+
+ if why.args[0] in (ECONNRESET, ENOTCONN, ESHUTDOWN,
ECONNABORTED):
self.handle_close()
- return 0
- else:
- raise
+ return 0
nbytes = asyncore_send(self, data, flags)
if channel.balance < 0: