Update 'src/pubsub/pubsub/pubsub_library_v4.py'
Added has_msg request to only start counting once the publishing has started
This commit is contained in:
parent
95276b75da
commit
61ebd7ca68
@ -129,7 +129,7 @@ class MinimalSubscriber(Node):
|
|||||||
ture = timer_overflow >> error
|
ture = timer_overflow >> error
|
||||||
false = no timer_overflow >> no error"""
|
false = no timer_overflow >> no error"""
|
||||||
self.overflow = False
|
self.overflow = False
|
||||||
if time_limit > 0:
|
if time_limit > 0 and self.has_msg():
|
||||||
if time.time() > self.last_msg_time + time_limit:
|
if time.time() > self.last_msg_time + time_limit:
|
||||||
self.watchdog += 1
|
self.watchdog += 1
|
||||||
self.trust = 0
|
self.trust = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user