diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-11-30 22:57:20 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-11-30 22:57:20 +0100 |
commit | c47cb65fb80325cf9a6791fad66c75b603c6ee28 (patch) | |
tree | 32f87ff45f1220542d8c083c48dce6e0a6383003 | |
parent | 3a3d7f1ffbf89bf41a0304e6072817006f38ddc0 (diff) | |
download | exchange-c47cb65fb80325cf9a6791fad66c75b603c6ee28.tar.xz |
-nicer suicide
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 780c4658d..0d001fde7 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -918,15 +918,6 @@ handle_mhd_request (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Handling new request\n"); - cnt = req_count++; - if (req_max == cnt) - { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Restarting exchange service after %llu requests\n", - cnt); - (void) kill (getpid (), - SIGTERM); - } /* We're in a new async scope! */ rc = *con_cls = GNUNET_new (struct TEH_RequestContext); @@ -1661,6 +1652,15 @@ connection_done (void *cls, if (NULL != input_filename) GNUNET_SCHEDULER_shutdown (); #endif + cnt = req_count++; + if (req_max == cnt) + { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Restarting exchange service after %llu requests\n", + cnt); + (void) kill (getpid (), + SIGTERM); + } } |