mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-22 17:02:21 -05:00
PircBot: Gracefully handle disposing of the PircBot before I/O threads are started
This commit is contained in:
parent
ae871f8a1f
commit
a69fafc4dd
@ -2983,8 +2983,12 @@ public abstract class PircBot implements ReplyConstants {
|
|||||||
*/
|
*/
|
||||||
public synchronized void dispose() {
|
public synchronized void dispose() {
|
||||||
//System.out.println("disposing...");
|
//System.out.println("disposing...");
|
||||||
_outputThread.interrupt();
|
if (_outputThread != null) {
|
||||||
_inputThread.dispose();
|
_outputThread.interrupt();
|
||||||
|
}
|
||||||
|
if (_inputThread != null) {
|
||||||
|
_inputThread.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user