bug fix and code optimization when reloading haproxy subprocess