Skip to content

Commit

Permalink
fix: reject promise if peer connection observer is not found (#2)
Browse files Browse the repository at this point in the history
* fix: promise reject if peer connection observer is not found

* 118.1.2-alpha.1

* fix final values

* 118.1.2-alpha.2
  • Loading branch information
santhoshvai authored Oct 10, 2024
1 parent d249142 commit 737b20e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ public void peerConnectionSetConfiguration(ReadableMap configuration, int id) {
public void peerConnectionCreateOffer(int id, ReadableMap options, Promise promise) {
ThreadUtils.runOnExecutor(() -> {
PeerConnectionObserver pco = mPeerConnectionObservers.get(id);
PeerConnection peerConnection = pco.getPeerConnection();
PeerConnection peerConnection = pco == null ? null : pco.getPeerConnection();

if (peerConnection == null) {
Log.d(TAG, "peerConnectionCreateOffer() peerConnection is null");
Expand Down Expand Up @@ -1128,7 +1128,7 @@ public void onSetFailure(String s) {
public void peerConnectionSetRemoteDescription(int id, ReadableMap desc, Promise promise) {
ThreadUtils.runOnExecutor(() -> {
PeerConnectionObserver pco = mPeerConnectionObservers.get(id);
PeerConnection peerConnection = pco.getPeerConnection();
PeerConnection peerConnection = pco == null ? null : pco.getPeerConnection();

if (peerConnection == null) {
Log.d(TAG, "peerConnectionSetRemoteDescription() peerConnection is null");
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/react-native-webrtc",
"version": "118.1.1",
"version": "118.1.2-alpha.2",
"repository": {
"type": "git",
"url": "git+https://github.com/GetStream/react-native-webrtc.git"
Expand Down

0 comments on commit 737b20e

Please sign in to comment.