ha: Close control FIFO if it is not valid
authorTobias Brunner <tobias@strongswan.org>
Thu, 27 Aug 2015 12:31:42 +0000 (14:31 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 27 Aug 2015 12:31:42 +0000 (14:31 +0200)
src/libcharon/plugins/ha/ha_ctl.c

index 27ebb91..54302e8 100644 (file)
@@ -111,6 +111,10 @@ static job_requeue_t dispatch_fifo(private_ha_ctl_t *this)
                        DBG1(DBG_CFG, "%s is not a FIFO, recreate it", HA_FIFO);
                        recreate_fifo();
                }
+               if (fifo != -1)
+               {
+                       close(fifo);
+               }
                sleep(1);
                return JOB_REQUEUE_FAIR;
        }