Fix the WebSocket sendBinary error

Summary:
Fixing the WebSocket SendBinary method error. This is a regression caused during recent change.
Closes https://github.com/facebook/react-native/pull/7956

Differential Revision: D3398065

fbshipit-source-id: 5d56eba807b59d1f3265cba5d5f501d610afebf2
This commit is contained in:
Sreejumon authored and Facebook Github Bot 0 committed 2016-06-07 01:58:24 -07:00
1 parent 46c02b6ae5
commit 7742900931
1 file changed
+1 -1
@@ -223,7 +223,7 @@ public class WebSocketModule extends ReactContextBaseJavaModule {
throw new RuntimeException("Cannot send a message. Unknown WebSocket id " + id);
}
try {
client.sendMessage(RequestBody.create(WebSocket.TEXT, ByteString.decodeBase64(base64String)));
client.sendMessage(RequestBody.create(WebSocket.BINARY, ByteString.decodeBase64(base64String)));
} catch (IOException | IllegalStateException e) {
notifyWebSocketFailed(id, e.getMessage());
}