Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/2233#discussion_r70614809 --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/SocketTextStreamFunction.java --- @@ -96,19 +96,21 @@ public void run(SourceContext<String> ctx) throws Exception { socket.connect(new InetSocketAddress(hostname, port), CONNECTION_TIMEOUT_TIME); BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); - int data; - while (isRunning && (data = reader.read()) != -1) { - // check if the string is complete - if (data != delimiter) { - buffer.append((char) data); - } - else { + char[] cbuf = new char[8192]; + int byteRead; --- End diff -- This variable should be named `bytesRead` .
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---