socket with no endpoint can be cleanly shut down

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>