mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-20 20:46:16 +02:00
refresh last seen
This commit is contained in:
parent
3546ade3bd
commit
5623596b24
1 changed files with 8 additions and 0 deletions
|
@ -253,6 +253,14 @@ void StreamServer::onMessageReceived(StreamSession* connection, const msg::BaseM
|
|||
timeMsg.latency = (requestMsg.received.sec - requestMsg.sent.sec) + (requestMsg.received.usec - requestMsg.sent.usec) / 1000000.;
|
||||
logD << "Latency: " << timeMsg.latency << ", refers to: " << timeMsg.refersTo << "\n";
|
||||
connection->send(&timeMsg);
|
||||
|
||||
// refresh connection state
|
||||
ClientInfoPtr client = Config::instance().getClientInfo(connection->macAddress);
|
||||
if (client != nullptr)
|
||||
{
|
||||
gettimeofday(&client->lastSeen, NULL);
|
||||
client->connected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (baseMessage.type == message_type::kHello)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue