mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
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:
1 parent
d291862c53
commit
5c3a884ae5
1 file changed
+3
-2
@@ -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
|
||||
|
||||