Browse files

print warning if older version of twisted without abortConnection

  • Loading branch information...
1 parent 27de695 commit 77e7e2a1b36ab71566d82e39568088d77109e4ce @forrestv forrestv committed Feb 25, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 p2pool/
7 p2pool/
@@ -14,7 +14,7 @@
if '--iocp' in sys.argv:
from twisted.internet import iocpreactor
-from twisted.internet import defer, reactor, protocol, task
+from twisted.internet import defer, reactor, protocol, task, tcp
from twisted.web import server
from twisted.python import log
from nattraverso import portmapper, ipdiscover
@@ -355,6 +355,11 @@ def status_thread():
log.err(None, 'Fatal error:')
def run():
+ if not hasattr(tcp.Client, 'abortConnection'):
+ print "Twisted doesn't have abortConnection! Upgrade to a newer version of Twisted to avoid memory leaks!"
+ print 'Pausing for 3 seconds...'
+ time.sleep(3)
realnets = dict((name, net) for name, net in networks.nets.iteritems() if '_testnet' not in name)
parser = fixargparse.FixedArgumentParser(description='p2pool (version %s)' % (p2pool.__version__,), fromfile_prefix_chars='@')

0 comments on commit 77e7e2a

Please sign in to comment.