mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Firefox not allowing connection to autoreload websocket when using a self-signed SSL certificate
Instead of displaying an unhandled error, just log it to console
This commit is contained in:
parent
98b235e8e7
commit
2d5840f40d
@ -16,7 +16,13 @@ class Watcher:
|
||||
self.reconnect()
|
||||
|
||||
def reconnect(self):
|
||||
self.ws = WebSocket(self.url)
|
||||
try:
|
||||
self.ws = WebSocket(self.url)
|
||||
except DOMException as e:
|
||||
if e.name == 'SecurityError':
|
||||
console.log('Not allowed to connect to auto-reload watcher, probably because using a self-signed, or otherwise invalid SSL certificate')
|
||||
return
|
||||
raise
|
||||
|
||||
self.ws.onopen = def(event):
|
||||
self.retries = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user