[Twisted-Python] Connector Inconsistency
dizzyd at jabber.org
Mon Jul 21 23:07:52 EDT 2003
-----BEGIN PGP SIGNED MESSAGE-----
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() # ?!
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
Any objections or alternatives?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
-----END PGP SIGNATURE-----
More information about the Twisted-Python