Mercurial > dovecot > core-2.2
changeset 21843:6b8a5eff6de5
push-notification-driver-ox: Wait for http requests to finish in deinit
This is to make sure mail_user is still usable in http response
callback.
author | Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
---|---|
date | Wed, 29 Mar 2017 20:04:47 +0300 |
parents | 86e52ff70044 |
children | afa236a944eb |
files | src/plugins/push-notification/push-notification-driver-ox.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/push-notification/push-notification-driver-ox.c Thu Mar 30 15:53:59 2017 +0300 +++ b/src/plugins/push-notification/push-notification-driver-ox.c Wed Mar 29 20:04:47 2017 +0300 @@ -422,6 +422,7 @@ i_free(dconfig->cached_ox_metadata); if (ox_global != NULL) { + http_client_wait(ox_global->http_client); i_assert(ox_global->refcount > 0); --ox_global->refcount; } @@ -431,7 +432,6 @@ { if ((ox_global != NULL) && (ox_global->refcount <= 0)) { if (ox_global->http_client != NULL) { - http_client_wait(ox_global->http_client); http_client_deinit(&ox_global->http_client); } i_free_and_null(ox_global);