public void close() throws IOException { if (channel != null) { channel.close(); } if (client != null) { client.replay = null; client.close(); } }