diff --git a/lib/rconn.c b/lib/rconn.c index 5bd352b..278ab57 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -496,7 +496,7 @@ rconn_is_connected(const struct rconn *rconn) int rconn_disconnected_duration(const struct rconn *rconn) { - return rconn_is_connected(rconn) ? 0 : time(0) - rconn->last_connected; + return rconn_is_connected(rconn) ? 0 : time(0) - rconn->last_received; } /* Returns the IP address of the peer, or 0 if the peer is not connected over