From 28f46cb8b3d94a7e2977c2e9e2a97b8dbe524f2b Mon Sep 17 00:00:00 2001 From: "Denilson M. Amorim" Date: Sun, 15 Nov 2015 11:08:48 -0300 Subject: [PATCH] Dont run twice if daemon too --- src/bitmessagemain.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index a636730d..079ba5bd 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -44,8 +44,9 @@ from debug import logger # Helper Functions import helper_bootstrap import helper_generic -import upnp - + +# singleton lock instance +thisapp = None def connectToStream(streamNumber): shared.streamsInWhichIAmParticipating[streamNumber] = 'no data' @@ -140,6 +141,8 @@ if shared.useVeryEasyProofOfWorkForTesting: class Main: def start(self, daemon=False): + global thisapp + _fixWinsock() shared.daemon = daemon