client: prevent use after close