From 9c2b9929045a4121ce81b3e28a1a7ab742a3daa8 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 25 Nov 2020 08:44:56 +0200 Subject: GmRequest: Fixed lack of update notifications --- src/gmrequest.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gmrequest.c') diff --git a/src/gmrequest.c b/src/gmrequest.c index 14f77405..53a3d031 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c @@ -211,9 +211,11 @@ static void readIncoming_GmRequest_(iGmRequest *d, iTlsRequest *req) { initCurrent_Time(&resp->when); delete_Block(data); unlock_Mutex(d->mtx); - const iBool allowed = exchange_Atomic(&d->allowUpdate, iFalse); - if (notifyUpdate && allowed) { - iNotifyAudience(d, updated, GmRequestUpdated); + if (notifyUpdate) { + const iBool allowed = exchange_Atomic(&d->allowUpdate, iFalse); + if (allowed) { + iNotifyAudience(d, updated, GmRequestUpdated); + } } if (notifyDone) { iNotifyAudience(d, finished, GmRequestFinished); -- cgit v1.2.3