소스 검색

Allow setting output queue before connecting.

Before we connect, the socket will be null. When we then connect
the right output stream will be passed in.
pull/143/head
Chris Smith 7 년 전
부모
커밋
99483f18f7
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5
    1
      irc/src/main/java/com/dmdirc/parser/irc/IRCParser.java

+ 5
- 1
irc/src/main/java/com/dmdirc/parser/irc/IRCParser.java 파일 보기

@@ -314,7 +314,11 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
314 314
     public void setOutputQueue(final OutputQueue queue) throws IOException {
315 315
         checkNotNull(queue);
316 316
         out.clearQueue();
317
-        queue.setOutputStream(socket.getOutputStream());
317
+
318
+        if (socket != null) {
319
+            queue.setOutputStream(socket.getOutputStream());
320
+        }
321
+
318 322
         out = queue;
319 323
     }
320 324
 

Loading…
취소
저장