Disconnect.
()
| 630 | * Disconnect. |
| 631 | */ |
| 632 | protected synchronized void disconnect() { |
| 633 | if (socket != null) { |
| 634 | try { |
| 635 | socket.close(); |
| 636 | } catch (IOException e) { |
| 637 | // ignore it |
| 638 | } |
| 639 | socket = null; |
| 640 | if (traceInput != null && traceOutput != null) |
| 641 | eu.faircode.email.TrafficStatsHelper.report(host, prefix, |
| 642 | traceOutput.getSent(), traceInput.getReceived()); |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | /** |
| 647 | * Get the name of the local host. |