fixes bug when crash would occur instead of logging on socket error and dispatch update and newhost  events