fixed connectionbrokennessdetection
This commit is contained in:
parent
209743fd55
commit
764e84cefd
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.7)
|
cmake_minimum_required (VERSION 3.7)
|
||||||
project (expandurl-mastodon
|
project (expandurl-mastodon
|
||||||
VERSION 0.9.7
|
VERSION 0.9.8
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ const std::vector<Easy::Notification> Listener::get_new_messages()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If the last keep-alive packet was received 25 seconds or more ago
|
// If the last keep-alive packet was received 25 seconds or more ago
|
||||||
if (duration_cast<seconds>(lastping - system_clock::now()).count() >= 25)
|
if (duration_cast<seconds>(system_clock::now() - lastping).count() >= 25)
|
||||||
{
|
{
|
||||||
lastping = system_clock::now();
|
lastping = system_clock::now();
|
||||||
syslog(LOG_NOTICE, "Detected broken connection.");
|
syslog(LOG_NOTICE, "Detected broken connection.");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user