--- src/advertising.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/advertising.c b/src/advertising.c index 2f187edcf..26e24ee01 100644 --- a/src/advertising.c +++ b/src/advertising.c @@ -587,8 +587,10 @@ static bool parse_timeout(DBusMessageIter *iter, if (client->to_id) g_source_remove(client->to_id); - client->to_id = g_timeout_add_seconds(client->timeout, client_timeout, - client); + if(client->timeout > 0) { + client->to_id = g_timeout_add_seconds(client->timeout, client_timeout, + client); + } return true; } -- 2.17.1