|
@@ -918,7 +918,7 @@ public class IRCParser implements Runnable {
|
918
|
918
|
* @param fromParser is this line from the parser? (used for callDataOut)
|
919
|
919
|
*/
|
920
|
920
|
protected void doSendString(final String line, final boolean fromParser) {
|
921
|
|
- if (out == null) { return; }
|
|
921
|
+ if (out == null || getSocketState() != SocketState.OPEN) { return; }
|
922
|
922
|
callDataOut(line, fromParser);
|
923
|
923
|
out.printf("%s\r\n", line);
|
924
|
924
|
final String[] newLine = tokeniseLine(line);
|
|
@@ -1872,17 +1872,15 @@ public class IRCParser implements Runnable {
|
1872
|
1872
|
* @param timer The timer that called this.
|
1873
|
1873
|
*/
|
1874
|
1874
|
protected void pingTimerTask(final Timer timer) {
|
1875
|
|
- if (getPingNeeded()) {
|
|
1875
|
+ if (getPingNeeded()) {
|
1876
|
1876
|
if (!callPingFailed()) {
|
1877
|
|
-
|
1878
|
|
- pingTimerSem.acquireUninterruptibly();
|
1879
|
|
-
|
1880
|
|
- if (pingTimer != null && pingTimer.equals(timer)) {
|
1881
|
|
- pingTimer.cancel();
|
1882
|
|
- }
|
1883
|
|
-
|
1884
|
|
- pingTimerSem.release();
|
1885
|
|
-
|
|
1877
|
+ pingTimerSem.acquireUninterruptibly();
|
|
1878
|
+
|
|
1879
|
+ if (pingTimer != null && pingTimer.equals(timer)) {
|
|
1880
|
+ pingTimer.cancel();
|
|
1881
|
+ }
|
|
1882
|
+ pingTimerSem.release();
|
|
1883
|
+
|
1886
|
1884
|
disconnect("Server not responding.");
|
1887
|
1885
|
}
|
1888
|
1886
|
} else {
|