mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
console: Catch spice connection errors (bz #971558)
This commit is contained in:
parent
2c918ecaa6
commit
82ef6ba173
@ -513,12 +513,19 @@ class SpiceViewer(Viewer):
|
|||||||
return self.spice_session is not None
|
return self.spice_session is not None
|
||||||
|
|
||||||
def _main_channel_event_cb(self, channel, event):
|
def _main_channel_event_cb(self, channel, event):
|
||||||
|
if not self.console:
|
||||||
|
return
|
||||||
|
|
||||||
if event == SpiceClientGLib.ChannelEvent.CLOSED:
|
if event == SpiceClientGLib.ChannelEvent.CLOSED:
|
||||||
if self.console:
|
self.console.disconnected()
|
||||||
self.console.disconnected()
|
|
||||||
elif event == SpiceClientGLib.ChannelEvent.ERROR_AUTH:
|
elif event == SpiceClientGLib.ChannelEvent.ERROR_AUTH:
|
||||||
if self.console:
|
self.console.activate_auth_page()
|
||||||
self.console.activate_auth_page()
|
elif event in [SpiceClientGLib.ChannelEvent.ERROR_CONNECT,
|
||||||
|
SpiceClientGLib.ChannelEvent.ERROR_IO,
|
||||||
|
SpiceClientGLib.ChannelEvent.ERROR_LINK,
|
||||||
|
SpiceClientGLib.ChannelEvent.ERROR_TLS]:
|
||||||
|
logging.debug("Spice channel event error: %s", event)
|
||||||
|
self.console.disconnected()
|
||||||
|
|
||||||
def _channel_open_fd_request(self, channel, tls_ignore):
|
def _channel_open_fd_request(self, channel, tls_ignore):
|
||||||
if not self.console.tunnels:
|
if not self.console.tunnels:
|
||||||
|
Loading…
Reference in New Issue
Block a user