Skip to content

Commit

Permalink
Merge pull request #123 from rrayst/master
Browse files Browse the repository at this point in the history
fixed WebSockets message types: binary vs text
  • Loading branch information
brendandburns authored Nov 23, 2017
2 parents 694caf3 + ad2e290 commit fc13f8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/src/main/java/io/kubernetes/client/util/WebSockets.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public void onOpen(final WebSocket webSocket, Response response) {
@Override
public void onMessage(ResponseBody body) throws IOException {
if (body.contentType() == TEXT) {
listener.bytesMessage(body.byteStream());
} else if (body.contentType() == BINARY) {
listener.textMessage(body.charStream());
} else if (body.contentType() == BINARY) {
listener.bytesMessage(body.byteStream());
}
body.close();
}
Expand Down

0 comments on commit fc13f8f

Please sign in to comment.