'socket hang up' handling and reconnection