Skip to content

Commit

Permalink
PircBot: Gracefully handle disposing of the PircBot before I/O thread…
Browse files Browse the repository at this point in the history
…s are started
  • Loading branch information
steven676 authored and pocmo committed Jun 29, 2011
1 parent ae871f8 commit a69fafc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions application/src/org/jibble/pircbot/PircBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -2983,8 +2983,12 @@ public final String[] getChannels() {
*/
public synchronized void dispose() {
//System.out.println("disposing...");
_outputThread.interrupt();
_inputThread.dispose();
if (_outputThread != null) {
_outputThread.interrupt();
}
if (_inputThread != null) {
_inputThread.dispose();
}
}


Expand Down

0 comments on commit a69fafc

Please sign in to comment.