Ticket #4119 defect new
Windows 7: A non-blocking socket operation could not be completed immediately
| Reported by: | tom | Owned by: | PenguinOfDoom |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | windows |
| Cc: | Branch: | ||
| Author: | Launchpad Bug: |
Description (last modified by exarkun) (diff)
Windows 7: A non-blocking socket operation could not be completed immediately
I'm on Windows 7 64, Python 2.6.4, Twisted 8.2.0
from twisted.internet import reactor, protocol
class Echo(protocol.Protocol):
def dataReceived(self, data):
self.transport.write(data)
factory = protocol.ServerFactory()
factory.protocol = Echo
reactor.listenTCP(8000, factory)
reactor.run()
It crashes at once with the following message:
Traceback (most recent call last):
File "C:\Users\tom\Documents\server.py", line 5, in <module>
reactor.listenTCP(8000, Echo())
File "C:\Program Files (x86)\Python\lib\site-packages\twisted\internet\posixbase.py", line 356, in listenTCP
p.startListening()
File "C:\Program Files (x86)\Python\lib\site-packages\twisted\internet\tcp.py", line 862, in startListening
self._realPortNumber = skt.getsockname()[1]
File "<string>", line 1, in getsockname
socket.error: [Errno 10035] A non-blocking socket operation could not be completed immediately
tried this patch, but nothing changes:
from twisted.python.util import untilConcludes self._realPortNumber = untilConcludes(lambda: skt.getsockname()[1])
Change History
Note: See
TracTickets for help on using
tickets.
