Always update path->send.time
This commit is contained in:
13
mud.c
13
mud.c
@@ -230,15 +230,14 @@ ssize_t mud_send_path (struct mud *mud, struct path *path, uint64_t now,
|
|||||||
|
|
||||||
ssize_t ret = sendmsg(mud->fd, &msg, 0);
|
ssize_t ret = sendmsg(mud->fd, &msg, 0);
|
||||||
|
|
||||||
if (ret == (ssize_t)size) {
|
if ((ret == (ssize_t)size) &&
|
||||||
if (path->recv.time > path->send.time) {
|
(path->recv.time > path->send.time)) {
|
||||||
path->last_time = now;
|
path->last_time = now;
|
||||||
path->last_count = 0;
|
path->last_count = 0;
|
||||||
}
|
|
||||||
|
|
||||||
path->send.time = now;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path->send.time = now;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user