Don't call exit() in Shutdown() for Bitcoin-Qt (fixes a tray-icon issue)
authorPhilip Kaufmann <phil.kaufmann@t-online.de>
Mon, 11 Jun 2012 05:40:14 +0000 (07:40 +0200)
committerLuke Dashjr <luke-jr+git@utopios.org>
Thu, 14 Jun 2012 17:32:45 +0000 (17:32 +0000)
(partial of 9247134eaba9a1d0fa74f22de238af1476663005)

src/init.cpp
src/qt/bitcoin.cpp

index 5f1e4f5..6b6a743 100644 (file)
@@ -66,7 +66,10 @@ void Shutdown(void* parg)
         Sleep(50);
         printf("Bitcoin exiting\n\n");
         fExit = true;
+#ifndef QT_GUI
+        // ensure non UI client get's exited here, but let Bitcoin-Qt reach return 0; in bitcoin.cpp
         exit(0);
+#endif
     }
     else
     {
index 3157ead..8dde8f3 100644 (file)
@@ -208,6 +208,7 @@ int main(int argc, char *argv[])
                 window.hide();
                 guiref = 0;
             }
+            // Shutdown the core and it's threads, but don't exit Bitcoin-Qt here
             Shutdown(NULL);
         }
         else