Wait for fully established to ensure data channel is ready (#949)

This commit is contained in:
Raja Subramanian
2022-08-24 16:51:43 +05:30
committed by GitHub
parent aaa3a5b46e
commit 00b131da50
+1 -1
View File
@@ -615,7 +615,7 @@ func (c *RTCClient) ensurePublisherConnected() error {
case <-ctx.Done():
return fmt.Errorf("could not connect publisher after timeout")
case <-time.After(10 * time.Millisecond):
if c.publisher.HasEverConnected() {
if c.publisherFullyEstablished.Load() {
return nil
}
}