bitkeeper revision 1.1108.1.18 (410132d727sJm8mjzG0hN7Txe_COkg)

Fix problem where a failed console connect terminates an existing
console connection.
This commit is contained in:
mjw@wray-m-3.hpl.hp.com committed 2004-07-23 15:46:31 +00:00
1 parent d291862c53
commit 5c3a884ae5
1 file changed
+3 -2
+3 -2
View File
@@ -57,7 +57,7 @@ class ConsoleProtocol(protocol.Protocol):
self.idx, str(self.addr[0]), str(self.addr[1]))
eserver.inject('xend.console.disconnect',
[self.idx, self.addr[0], self.addr[1]])
self.controller.disconnect()
self.controller.disconnect(conn=self)
def loseConnection(self):
self.transport.loseConnection()
@@ -211,9 +211,10 @@ class ConsoleController(controller.Controller):
self.handleOutput()
return 0
def disconnect(self):
def disconnect(self, conn=None):
"""Disconnect the TCP connection to the console.
"""
if conn and conn != self.conn: return
if self.conn:
self.conn.loseConnection()
self.addr = None
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.