You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2016/06/02 02:45:09 UTC
[5/7] incubator-joshua git commit: Fixed other server test case
Fixed other server test case
Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/cdf88c52
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/cdf88c52
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/cdf88c52
Branch: refs/heads/master
Commit: cdf88c52df284a7ef2116c88896029b6a708f776
Parents: 036add6
Author: Matt Post <po...@cs.jhu.edu>
Authored: Wed Jun 1 22:29:52 2016 -0400
Committer: Matt Post <po...@cs.jhu.edu>
Committed: Wed Jun 1 22:29:52 2016 -0400
----------------------------------------------------------------------
src/main/java/org/apache/joshua/server/ServerThread.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/cdf88c52/src/main/java/org/apache/joshua/server/ServerThread.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/joshua/server/ServerThread.java b/src/main/java/org/apache/joshua/server/ServerThread.java
index 4fa20d8..6de2e6c 100644
--- a/src/main/java/org/apache/joshua/server/ServerThread.java
+++ b/src/main/java/org/apache/joshua/server/ServerThread.java
@@ -87,6 +87,14 @@ public class ServerThread extends Thread implements HttpHandler {
OutputStream out = socket.getOutputStream();
+ for (;;) {
+ Translation translation = translations.next();
+ if (translation == null)
+ break;
+
+ out.write(translation.toString().getBytes());
+ }
+
} catch (SocketException e) {
LOG.error(" Socket interrupted", e);
request.shutdown();