Fix bad socket handling during external service termination.