[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Peter Saveliev
Peter Saveliev added the comment: Possible solution would be something like that in SSLSocket.do_handshake(): try: self._sslobj.do_handshake() except SSLError as e: # or even any Exception? self._sock.close() raise e

[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Peter Saveliev
New submission from Peter Saveliev: Important: only Python2 versions are affected. Python3 works OK. Possibly related issue: http://bugs.python.org/issue12378 (differs: see the line above) Having a server with SSLSocket waiting for connections, the incoming connection, failed on automatic

[issue11866] race condition in threading._newname()

2011-08-13 Thread Peter Saveliev
Peter Saveliev added the comment: counter.next() is a C routine and it is atomic from Python's point of view — if I understand right. The test shows that original threading.py leads to a (rare) race here, while with counter object there is no race cond

[issue11866] race condition in threading._newname()

2011-08-12 Thread Peter Saveliev
Peter Saveliev added the comment: Any news? I hope, the change is trivial enough… -- ___ Python tracker <http://bugs.python.org/issue11866> ___ ___ Python-bug

[issue11866] race condition in threading._newname()

2011-05-03 Thread Peter Saveliev
Peter Saveliev added the comment: Ok, patch attached. Patch made for Python: 2.6 Tested Python versions: 2.6, 2.7 -- keywords: +patch versions: +Python 2.6 Added file: http://bugs.python.org/file21866/newname_race_fix.patch ___ Python tracker

[issue11866] race condition in threading._newname()

2011-04-18 Thread Peter Saveliev
New submission from Peter Saveliev : The _newname() function has no locking. It is called from the new thread constructor. Such constructor is executed within parent thread. So, when several threads create new threads simultaneously, there can be race condition, leading to the same name for