Skip to content

Commit

Permalink
screw write UTF
Browse files Browse the repository at this point in the history
  • Loading branch information
tier2novelist committed Dec 12, 2018
1 parent 2baecf3 commit c6ba33f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private void send(ClientMessage message) {

try {
sb.append(ProtocolProps.LINE_SEPARATOR);
this.dos.writeUTF(sb.toString());
this.dos.write(org.apache.commons.codec.binary.StringUtils.getBytesUtf8(sb.toString()));
if(payload != null) {
this.dos.write(payload);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void write(ServerMessage serverMessage) {
}
try {
sb.append(ProtocolProps.LINE_SEPARATOR);
this.dos.writeUTF(sb.toString());
this.dos.write(org.apache.commons.codec.binary.StringUtils.getBytesUtf8(sb.toString()));
if(payload != null) {
this.dos.write(payload);
}
Expand Down

0 comments on commit c6ba33f

Please sign in to comment.