close client when server disconnects