[
https://issues.apache.org/jira/browse/FLINK-2490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14693076#comment-14693076
]
ASF GitHub Bot commented on FLINK-2490:
---------------------------------------
Github user HuangWHWHW commented on the pull request:
https://github.com/apache/flink/pull/992#issuecomment-130206658
@mxm
@StephanEwen
Hi, I do a test for this today and I got another problem.
The SocketTextStreamFunction use BufferedReader.read() to get the buffer
which is sent by socket server.
And whether this function BufferedReader.read() will never return -1 as the
end of the sent message?
If it was there should be another bug that code following will never be
reachable:
if (data == -1) {
socket.close();
long retry = 0;
boolean success = false;
while ((retry < maxRetry ||
retryForever) && !success) {
if (!retryForever) {
retry++;
}
LOG.warn("Lost connection to
server socket. Retrying in "
+
(CONNECTION_RETRY_SLEEP / 1000) + " seconds...");
try {
socket = new Socket();
socket.connect(new
InetSocketAddress(hostname, port),
CONNECTION_TIMEOUT_TIME);
success = true;
} catch (ConnectException ce) {
Thread.sleep(CONNECTION_RETRY_SLEEP);
socket.close();
}
}
if (success) {
LOG.info("Server socket is
reconnected.");
} else {
LOG.error("Could not reconnect
to server socket.");
break;
}
reader = new BufferedReader(new
InputStreamReader(socket.getInputStream()));
continue;
}
> Remove unwanted boolean check in function
> SocketTextStreamFunction.streamFromSocket
> -----------------------------------------------------------------------------------
>
> Key: FLINK-2490
> URL: https://issues.apache.org/jira/browse/FLINK-2490
> Project: Flink
> Issue Type: Bug
> Components: Streaming
> Affects Versions: 0.10
> Reporter: Huang Wei
> Priority: Minor
> Fix For: 0.10
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)