8000 Wrap unsafe EventSink · linuxerwang/flutter-webrtc@640f779 · GitHub
[go: up one dir, main page]

Skip to content

Commit 640f779

Browse files
authored
Wrap unsafe EventSink
1 parent e934818 commit 640f779

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

android/src/main/java/com/cloudwebrtc/webrtc/PeerConnectionObserver.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import android.util.SparseArray;
1212
import androidx.annotation.Nullable;
1313

14+
import com.cloudwebrtc.webrtc.utils.AnyThreadSink;
1415
import com.cloudwebrtc.webrtc.utils.ConstraintsArray;
1516
import com.cloudwebrtc.webrtc.utils.ConstraintsMap;
1617

@@ -59,7 +60,7 @@ class PeerConnectionObserver implements PeerConnection.Observer, EventChannel.St
5960

6061
@Override
6162
public void onListen(Object o, EventChannel.EventSink sink) {
62-
eventSink = sink;
63+
eventSink = new AnyThreadSink(sink);
6364
}
6465

6566
@Override

0 commit comments

Comments
 (0)
0