added watchdog for tcp connection