From 764e84cefd9bf8a22ccde7839c97464db64a4a85 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 11 Jun 2018 17:15:35 +0200 Subject: [PATCH] fixed connectionbrokennessdetection --- CMakeLists.txt | 2 +- src/masto.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b47e369..a362105 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (expandurl-mastodon - VERSION 0.9.7 + VERSION 0.9.8 LANGUAGES CXX ) diff --git a/src/masto.cpp b/src/masto.cpp index 9bbcd02..3f3e290 100644 --- a/src/masto.cpp +++ b/src/masto.cpp @@ -165,7 +165,7 @@ const std::vector Listener::get_new_messages() else { // If the last keep-alive packet was received 25 seconds or more ago - if (duration_cast(lastping - system_clock::now()).count() >= 25) + if (duration_cast(system_clock::now() - lastping).count() >= 25) { lastping = system_clock::now(); syslog(LOG_NOTICE, "Detected broken connection.");