summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/main.py2
-rw-r--r--ranger/ext/vcs/vcs.py4
-rw-r--r--ranger/gui/ui.py2
3 files changed, 5 insertions, 3 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 2cf9470a..8ebce9b5 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -183,6 +183,8 @@ https://github.com/hut/ranger/issues
             else:
                 exit_code = ex.code
     finally:
+        if exit_msg:
+            LOG.critical(exit_msg)
         try:
             fm.ui.destroy()
         except (AttributeError, NameError):
diff --git a/ranger/ext/vcs/vcs.py b/ranger/ext/vcs/vcs.py
index 64dec6a1..18077c6d 100644
--- a/ranger/ext/vcs/vcs.py
+++ b/ranger/ext/vcs/vcs.py
@@ -479,10 +479,10 @@ class VcsThread(threading.Thread):  # pylint: disable=too-many-instance-attribut
     def stop(self):
         """Stop thread synchronously"""
         self._stop.set()
-        self.paused.wait()
+        self.paused.wait(5)
         self._advance.set()
         self._awoken.set()
-        self.stopped.wait()
+        self.stopped.wait(1)
 
     def pause(self):
         """Pause thread"""
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index c3bc8539..1a930a23 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -133,7 +133,7 @@ class UI(  # pylint: disable=too-many-instance-attributes,too-many-public-method
         """Turn off curses"""
         if 'vcsthread' in self.__dict__:
             self.vcsthread.pause()
-            self.vcsthread.paused.wait()
+            self.vcsthread.paused.wait(5)
 
         self.win.keypad(0)
         curses.nocbreak()