Detect disconnections.