mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-10 18:38:39 +00:00
Catch and log ReactorNotRunning when stopping reactor in gtk
This commit is contained in:
parent
7b1e8862b4
commit
7847362dbb
4 changed files with 15 additions and 11 deletions
|
@ -289,7 +289,7 @@ class GtkUI(object):
|
|||
def on_dialog_response(response):
|
||||
if response != gtk.RESPONSE_YES:
|
||||
# The user does not want to turn Classic Mode off, so just quit
|
||||
reactor.stop()
|
||||
self.mainwindow.quit()
|
||||
return
|
||||
# Turning off classic_mode
|
||||
self.config["classic_mode"] = False
|
||||
|
|
|
@ -151,7 +151,7 @@ class IPCInterface(component.Component):
|
|||
def connect_failed(self, args):
|
||||
# This gets called when we're unable to do a connectUNIX to the ipc
|
||||
# socket. We'll delete the lock and socket files and start up Deluge.
|
||||
#reactor.stop()
|
||||
|
||||
socket = os.path.join(deluge.configmanager.get_config_dir("ipc"), "deluge-gtk")
|
||||
if os.path.exists(socket):
|
||||
try:
|
||||
|
|
|
@ -45,6 +45,7 @@ import deluge.component as component
|
|||
from deluge.configmanager import ConfigManager
|
||||
from deluge.ui.gtkui.ipcinterface import process_args
|
||||
from twisted.internet import reactor, defer
|
||||
from twisted.internet.error import ReactorNotRunning
|
||||
|
||||
import deluge.common
|
||||
import common
|
||||
|
@ -165,7 +166,10 @@ class MainWindow(component.Component):
|
|||
return client.disconnect()
|
||||
|
||||
def stop_reactor(result):
|
||||
return reactor.stop()
|
||||
try:
|
||||
reactor.stop()
|
||||
except ReactorNotRunning:
|
||||
log.debug("Attempted to stop the reactor but it is not running...")
|
||||
|
||||
def log_failure(failure, action):
|
||||
log.error("Encountered error attempting to %s: %s" % \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue