From 2add3f6bc865bddaa2f75dfb99819337c6b73b7d 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 78e1e903..4d68eff1 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -44,7 +44,9 @@ from debug import logger # Helper Functions import helper_bootstrap import helper_generic - + +# singleton lock instance +thisapp = None def connectToStream(streamNumber): shared.streamsInWhichIAmParticipating[streamNumber] = 'no data' @@ -139,6 +141,8 @@ if shared.useVeryEasyProofOfWorkForTesting: class Main: def start(self, daemon=False): + global thisapp + _fixWinsock() shared.daemon = daemon