fixup! formatting and cleanup on socket close