Opened 10 years ago

Last modified 10 years ago

#4635 defect new

htb.ShapedTransport should have a different behaviour than ShapedConsumer when it comes to unregistering

Reported by: Myers Carpenter Owned by:
Priority: normal Milestone:
Component: core Keywords: htb
Cc: Branch:
Author:

Description

When you use htb.ShapedProtocolFactory to wrap a protocol it wraps the protocols transport with ShapedTransport. This works great until you attach another producer like FileSender to that transport and it calls .unregisterProducer on the wrapped transport.

To see this in action, run ./server.py in one terminal, and ./client in another. Once the first filesender has finished you can see that the wrapped transport has lost ShapedTransport as it's producer, making the protocol instance good for nuttin.

Patch attached. No tests.

Attachments (3)

client.py (1.7 KB) - added by Myers Carpenter 10 years ago.
server.py (720 bytes) - added by Myers Carpenter 10 years ago.
htb-unregisterProducer.patch (861 bytes) - added by Myers Carpenter 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by Myers Carpenter

Attachment: client.py added

Changed 10 years ago by Myers Carpenter

Attachment: server.py added

Changed 10 years ago by Myers Carpenter

comment:1 Changed 10 years ago by Myers Carpenter

I would prefer that if I use FileSender on the wrapped transport that the Protocol still can send data afterwards.

comment:2 Changed 9 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.