Don't call filter destructors on SIGTERM CP-3770 cp-3770
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 22 Apr 2014 19:05:41 +0000 (21:05 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 22 Apr 2014 19:05:41 +0000 (21:05 +0200)
src/metaproxy_prog.cpp

index fa0ea33..167a58a 100644 (file)
@@ -87,8 +87,12 @@ static void work_common(void *data)
     mp::Package pack;
     pack.router(*routerp).move();
     yaz_log(YLOG_LOG, "metaproxy stop");
-    delete routerp;
-    routerp = 0;
+
+    if (sig_received != SIGTERM)
+    {
+        delete routerp;
+        routerp = 0;
+    }
     _exit(0);
 }