Ticket #5285 defect closed duplicate

Opened 3 years ago

Last modified 3 years ago

win32eventreactor misses disconnect events that happen too soon

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: core Keywords: win32
Cc: Branch:
Author: Launchpad Bug:

Description

If a client connects to a win32er tcp server and then disconnects very quickly (say, before win32er handles the connect event), then the disconnect event is never noticed or handled. The socket remains open and apparently connected indefinitely.

This may also require that the client send some data before it disconnects, I'm not sure.

Attached is a pair of client/server programs which will demonstrate this problem. If you run the server and then point the client at it, you should expect to see three messages in the server output. One announcing connection made, one announcing the arrival of the "x" byte, and one announcing the loss of the connection. Instead, only the first two messages will (almost always) appear. Only when the server is killed will the disconnect messages appear.

Attachments

someprog.py Download (506 bytes) - added by exarkun 3 years ago.
server
client-someprog.py Download (461 bytes) - added by exarkun 3 years ago.
client

Change History

Changed 3 years ago by exarkun

server

Changed 3 years ago by exarkun

client

1

Changed 3 years ago by exarkun

Observed with Python 2.7, Twisted trunk@32683, Windows XP 32 bit.

2

3

Changed 3 years ago by exarkun

(In [32691]) Rewrite the new writeSequence/producer tests to avoid #5285

refs #745 refs #5285

4

Changed 3 years ago by exarkun

Duplicate of #5233

5

Changed 3 years ago by exarkun

  • status changed from new to closed
  • resolution set to duplicate
Note: See TracTickets for help on using tickets.