public void stop() { writeLine("QUIT :Connection closing..."); reader.kill(); writer.kill(); try { bWriter.flush(); } catch (IOException e) { manager .getPlugin() .warn( "An error occurred while flushing the output stream for '" + hostname + ":" + port + "'"); } finally { try { bWriter.close(); bReader.close(); } catch (IOException e) { manager .getPlugin() .warn("An error occured while closing the streams for '" + hostname + ":" + port + "'"); } finally { try { connection.close(); } catch (IOException e) { manager .getPlugin() .warn( "An error occurred while closing the socket for '" + hostname + ":" + port + "'"); } } } }