mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Dont store a ref to the VNC client until we've actually successfully connected
This commit is contained in:
parent
9f4ff22209
commit
79b4531a54
@ -180,11 +180,15 @@ class GRFBViewer(gtk.DrawingArea):
|
||||
def connect_to_host(self, host, port):
|
||||
if self.client != None:
|
||||
self.disconnect_from_host()
|
||||
self.client = NOne
|
||||
|
||||
self.client = GRFBNetworkClient(host, port, self.fb)
|
||||
self.client.connect("disconnected", self._client_disconnected)
|
||||
client = GRFBNetworkClient(host, port, self.fb)
|
||||
client.connect("disconnected", self._client_disconnected)
|
||||
|
||||
self.client.init()
|
||||
client.init()
|
||||
# NB we delibrately dont assign to self.client until
|
||||
# we're successfully connected.
|
||||
self.client = client
|
||||
self.authenticated = False
|
||||
self.emit("connected", host, port)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user