Skip to content

Commit 7b076f5

Browse files
committed
fixes
1 parent ad99946 commit 7b076f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coordinator/gscoordinator/coordinator.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def __init__(self, launcher, dangling_seconds, log_level="INFO"):
146146

147147
# dangling check
148148
self._dangling_seconds = dangling_seconds
149-
if self._dangling_seconds != -1:
149+
if self._dangling_seconds >= 0:
150150
self._dangling_detecting_timer = threading.Timer(
151151
interval=self._dangling_seconds, function=self._cleanup, args=(True,)
152152
)
@@ -197,7 +197,7 @@ def ConnectSession(self, request, context):
197197
)
198198

199199
def HeartBeat(self, request, context):
200-
if self._dangling_seconds != -1:
200+
if self._dangling_seconds >= 0:
201201
# Reset dangling detect timer
202202
self._dangling_detecting_timer.cancel()
203203
self._dangling_detecting_timer = threading.Timer(

0 commit comments

Comments
 (0)