Unexpected `NoneType` in obfs3
Since my obfs3 bridge has gotten more popular, I decided to enable logging and I noticed that I've been getting these errors:
2014-05-06 14:47:51,643 [ERROR] Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/log.py", line 88, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/log.py", line 73, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 215, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 221, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.9_1_g4c41868-py2.7.egg/obfsproxy/network/extended_orport.py", line 189, in dataReceived
self.circuit.dataReceived(self.buffer, self)
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.9_1_g4c41868-py2.7.egg/obfsproxy/network/network.py", line 157, in dataReceived
self.transport.receivedUpstream(data)
File "/usr/local/lib/python2.7/dist-packages/obfsproxy-0.2.9_1_g4c41868-py2.7.egg/obfsproxy/transports/obfs3.py", line 102, in receivedUpstream
self.circuit.downstream.write(message)
exceptions.AttributeError: 'NoneType' object has no attribute 'downstream'
I get around 2-3 of them per day which means that it's not a very usual bug.