projects
/
rrq
/
rrqnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1e6338
)
fix the heartbeat bug
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sun, 26 Mar 2023 00:14:16 +0000
(11:14 +1100)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sun, 26 Mar 2023 00:14:16 +0000
(11:14 +1100)
rrqnet.c
patch
|
blob
|
history
diff --git
a/rrqnet.c
b/rrqnet.c
index b06c3abe4ca9af32efe217bce0aab7f7369812df..82b524dc3cc2bb213826e61d5327ec44c4f5965b 100644
(file)
--- a/
rrqnet.c
+++ b/
rrqnet.c
@@
-1806,11
+1806,13
@@
int main(int argc, char *argv[]) {
pthread_create( &thread, 0, doreadTap, &tap_reader );
}
- if ( heart_rate == 0 ) {
- // Start heartbeating to uplinks
-
for ( ;;
) {
+ // Start heartbeating to uplinks
+ for ( ;; ) {
+
if ( heart_rate != 0
) {
sleep( heart_rate );
heartbeat( udp_fd );
+ } else {
+ sleep( 600 );
}
}
return 0;