Skip to content

Commit e547f68

Browse files
committed
last_sent rename to 'last_sent_session_request'
1 parent 11dca32 commit e547f68

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/countly.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class Countly {
225225
int port;
226226
bool use_https;
227227
bool always_use_post;
228-
std::chrono::system_clock::time_point last_sent;
228+
std::chrono::system_clock::time_point last_sent_session_request;
229229
bool began_session;
230230

231231
json session_params;

src/countly.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ bool Countly::beginSession() {
400400
}
401401

402402
if (sendHTTP("/i", Countly::serializeForm(data)).success) {
403-
last_sent = Countly::getTimestamp();
403+
last_sent_session_request = Countly::getTimestamp();
404404
began_session = true;
405405
}
406406

@@ -507,7 +507,7 @@ bool Countly::updateSession() {
507507
return false;
508508
}
509509

510-
last_sent += duration;
510+
last_sent_session_request += duration;
511511

512512
#ifndef COUNTLY_USE_SQLITE
513513
event_queue.clear();
@@ -546,7 +546,7 @@ bool Countly::endSession() {
546546
{"end_session", "1"}
547547
};
548548
if (sendHTTP("/i", Countly::serializeForm(data)).success) {
549-
last_sent = now;
549+
last_sent_session_request = now;
550550
began_session = false;
551551
mutex.unlock();
552552
return true;
@@ -796,7 +796,7 @@ log(Countly::LogLevel::DEBUG, "[Countly][sendHTTP] data: "+ data);
796796

797797
std::chrono::system_clock::duration Countly::getSessionDuration(std::chrono::system_clock::time_point now) {
798798
mutex.lock();
799-
std::chrono::system_clock::duration duration = now - last_sent;
799+
std::chrono::system_clock::duration duration = now - last_sent_session_request;
800800
mutex.unlock();
801801
return duration;
802802
}

0 commit comments

Comments
 (0)