Fix premature "Connected to..." message
This commit is contained in:
parent
992f6373ab
commit
6dbddb6df2
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.7)
|
cmake_minimum_required (VERSION 3.7)
|
||||||
project (expandurl-mastodon
|
project (expandurl-mastodon
|
||||||
VERSION 0.7.3
|
VERSION 0.7.4
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -115,9 +115,9 @@ const bool Listener::write_config()
|
||||||
|
|
||||||
const void Listener::start()
|
const void Listener::start()
|
||||||
{
|
{
|
||||||
|
static std::uint_fast16_t ret = 0;
|
||||||
_thread = std::thread([=]
|
_thread = std::thread([=]
|
||||||
{
|
{
|
||||||
std::uint_fast16_t ret = 0;
|
|
||||||
_running = true;
|
_running = true;
|
||||||
Easy masto(_instance, _access_token);
|
Easy masto(_instance, _access_token);
|
||||||
masto.set_useragent(static_cast<const string>("expandurl-mastodon/") +
|
masto.set_useragent(static_cast<const string>("expandurl-mastodon/") +
|
||||||
|
@ -137,8 +137,12 @@ const void Listener::start()
|
||||||
{
|
{
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ret == 0)
|
||||||
|
{
|
||||||
syslog(LOG_NOTICE, "Connected to %s", _instance.c_str());
|
syslog(LOG_NOTICE, "Connected to %s", _instance.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const void Listener::stop()
|
const void Listener::stop()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user