refactor output_zabbix to always close the tcp connection after sending the message to the zabbix server