[Twisted-Python] Connector Inconsistency

Dave Smith dizzyd at jabber.org
Mon Jul 21 23:07:52 EDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings,

In talking with Itamar, the question came up of how to correctly 
shutdown a Connector. For example:

c = reactor.connectTCP(host, port, factory)
c.loseConnection() # ?!
# or
c.stopConnecting() # ?!

It is not codified anywhere that "loseConnection" will shutdown the 
connection, even if the connection is pending. As it stands now, you 
could call c.stopConnecting() or c.loseConnection(). The "correct" one 
to call is impossible to diagnose, as I can find no calls which 
indicate the state (in terms of connection) of the Connector. As such, 
I would suggest we drop the "stopConnecting" call and set it in stone 
that loseConnection() will do the Right Thing and stop connecting if in 
progress.

Any objections or alternatives?

Diz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)

iD8DBQE/HKqIYNE3chVHHsMRAvXoAKCzIMtOg8BaoiZrNbQnv9m2LZk6IACfWu8/
1r1FgHsmQp1hZQK/KogLHlk=
=Zb5b
-----END PGP SIGNATURE-----





More information about the Twisted-Python mailing list