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:
parent
46c02b6ae5
commit
7742900931
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue