Opened 16 years ago

Closed 14 years ago

#1277 defect closed invalid (invalid)

iocpreactor calls makeConnection without connection

Reported by: ghazel Owned by:
Priority: high Milestone:
Component: core Keywords:
Cc: justinj, ghazel Branch:
Author:

Description


Change History (5)

comment:1 Changed 16 years ago by ghazel

Using iocpreactor, occassionally makeConnection is called and transport.getHost
() crashes.

Here's the code:

def makeConnection(self, transport):
  print transport.getHost()
  ...
  Protocol.makeConnection(self, transport)

Here's the exception:
   File "twisted\internet\iocpreactor\tcp.pyc", line 30, in getHost
AttributeError: 'ServerSocket' object has no attribute 'socket'

Here's the stack:
   File "twisted\internet\iocpreactor\proactor.pyc", line 33, in run
   File "twisted\internet\iocpreactor\proactor.pyc", line 44, in mainLoop
   File "twisted\internet\iocpreactor\ops.pyc", line 94, in ovDone
   File "twisted\internet\iocpreactor\util.pyc", line 17, in helpful
   File "twisted\internet\iocpreactor\server.pyc", line 67, in 
handle_listening_acceptDone
   File "myapp.pyc", line 346, in makeConnection

Here's the contents of transport.__dict__:
 {'producerBuffer': [], 'writeBufferedSize': 0, 'writebuf': [], 'read_op': 
<twisted.internet.iocpreactor.ops.ReadFileOp instance at 
0x04008C10>, 'repstr': '<MyProtocol #1987 on 
3724>', 'logstr': 'MyProtocol,1987,142.151.154.116', 'state': 'disconnected', 'r
eadbuf': <read-write buffer ptr 0x03D19210, size 65536 at 
0x03D191F0>, 'write_op': <twisted.internet.iocpreactor.ops.WriteFileOp instance 
at 0x0304A850>, 'offset': 0, 'bufferEvents': {'buffer empty': Set([]), 'buffer 
full': Set([])}, 'reading': True, 'sf': <twisted.internet.protocol.Factory on 
6888>, 'reactor': <twisted.internet.iocpreactor.proactor.Proactor object at 
0x0166D558>}

comment:2 Changed 16 years ago by justinj

Component: conch
Owner: justinj deleted

comment:3 Changed 16 years ago by jknight

Component: conchcore

comment:4 Changed 14 years ago by PenguinOfDoom

Resolution: invalid
Status: newclosed

IOCP has been rewritten. Please try to reproduce.

comment:5 Changed 11 years ago by <automation>

Note: See TracTickets for help on using tickets.