Additional cleanup on socket close