Skip to content

Commit 842cad3

Browse files
committed
Store timer + set daemon flag so procs exit timely
1 parent 758f287 commit 842cad3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

instana/fsm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class Fsm(object):
2626

2727
agent = None
2828
fsm = None
29+
timer = None
2930

3031
def __init__(self, agent):
3132
l.debug("initializing fsm")
@@ -106,7 +107,9 @@ def announce_sensor(self, e):
106107
self.fsm.announce()
107108

108109
def schedule_retry(self, fun, e):
109-
t.Timer(self.RETRY_PERIOD, fun, [e]).start()
110+
self.timer = t.Timer(self.RETRY_PERIOD, fun, [e])
111+
self.timer.setDaemon(True)
112+
self.timer.start()
110113

111114
def test_agent(self, e):
112115
l.debug("testing communication with the agent")

0 commit comments

Comments
 (0)