calibre: do not attempt to stop the socket if nil (#7067)

reviewable/pr7068/r1
Martín Fernández 3 years ago committed by GitHub
parent 0685eecdad
commit cd9b3e10fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -255,10 +255,14 @@ end
function CalibreWireless:disconnect()
logger.info("disconnect from calibre")
self.connect_message = false
self.calibre_socket:stop()
UIManager:removeZMQ(self.calibre_messagequeue)
self.calibre_socket = nil
self.calibre_messagequeue = nil
if self.calibre_socket then
self.calibre_socket:stop()
self.calibre_socket = nil
end
if self.calibre_messagequeue then
UIManager:removeZMQ(self.calibre_messagequeue)
self.calibre_messagequeue = nil
end
CalibreMetadata:clean()
end

Loading…
Cancel
Save