Skip to content

Commit

Permalink
UnixDomainSocket: fix slow, segmented response
Browse files Browse the repository at this point in the history
  • Loading branch information
iongchun committed Apr 12, 2018
1 parent 073769e commit a28a0a4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ public String read() throws IOException {
response.clear();
reader.read(response);
result += new String(response.array(), response.arrayOffset(), response.position());
} while (response.position() == response.limit()
&& response.get(response.limit() - 1) != '\n');
} while (response.get(response.position() - 1) != '\n');

return result;
}
Expand Down

0 comments on commit a28a0a4

Please sign in to comment.