Restarting the zabbix-agent on win32 doesn't work sometimes because it can not bind to the port for a period of time. Attached patch adds the SO_REUSEADDR socket option which fixes the problem (I have made the same patch some time last year for the X client which was integrated).