Detect for disconnect.