[Twisted-Python] Question about StreamServerEndpointService
Hi! I have a question regarding `t.a.i.StreamServerEndpointService`. This class maintains an attribute `_waitingForPort` that holds the deferred returned by the `listen` method of the endpoint. If this attribute is None, the method `privilegedStartService` is called by `startService`, triggering the endpoint's `listen` method (among other things). I don't understand why this attribute is not reset to `None` when `stopService` is executed. With the deferred still around, starting the service again doesn't seem to work as expected, since it will not call `privilegedStartService` the second time. I might be wrong, but this looks like a bug to me. Maybe I didn't understand how to use this class, though... Any comments? Albert -- Albert Brandl Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56 web: http://www.weiermayer.com
On Apr 26, 2011, at 6:21 AM, Albert Brandl wrote:
I might be wrong, but this looks like a bug to me. Maybe I didn't understand how to use this class, though...
I haven't investigated too thoroughly, but it sounds like you have, and this does indeed sound like a bug. Could you write it up (<http://twistedmatrix.com/trac/newticket>), so it doesn't get lost? Thanks, -g
Hi! On Wed, Apr 27, 2011 at 01:19:28AM -0400, Glyph Lefkowitz wrote:
I haven't investigated too thoroughly, but it sounds like you have, and this does indeed sound like a bug. Could you write it up (<http://twistedmatrix.com /trac/newticket>), so it doesn't get lost?
Sure - http://twistedmatrix.com/trac/ticket/5071. Best regards, Albert -- Albert Brandl Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56 web: http://www.weiermayer.com
On Apr 27, 2011, at 4:26 AM, Albert Brandl wrote:
Hi!
On Wed, Apr 27, 2011 at 01:19:28AM -0400, Glyph Lefkowitz wrote:
I haven't investigated too thoroughly, but it sounds like you have, and this does indeed sound like a bug. Could you write it up (<http://twistedmatrix.com /trac/newticket>), so it doesn't get lost?
Thanks a lot. If you'd like to contribute a patch, of course, that would be doubly appreciated :). Otherwise, someone will get to it eventually. (This might even deserve the 'easy' keyword, as I think the bug is pretty straightforward... unfortunately the functionality requires understanding of a whole bunch of Twisted-specific concepts...)
On Wed, Apr 27, 2011 at 04:50:17AM -0400, Glyph Lefkowitz wrote:
Thanks a lot. If you'd like to contribute a patch, of course, that would be doubly appreciated :).
I already thought about doing so. But my experience shows that patches usually take some rounds to be accepted, and I'd prefer to do this when I have more time (which will hopefully be the case in some weeks). Regards, -- Albert Brandl Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56 web: http://www.weiermayer.com
participants (2)
-
Albert Brandl
-
Glyph Lefkowitz