add socket connection broken detections.