We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 775c52e commit c347e1fCopy full SHA for c347e1f
1 file changed
gamestreaming_webrtc/src/client.rs
@@ -214,8 +214,18 @@ impl GamestreamingClient {
214
.set_ice(session, ice_candidate_init)
215
.await
216
.map_err(GsError::ApiError)?;
217
- self.api.get_ice(session)
218
- .await
+
+ let mut ice_result = self.api.get_ice(session).await;
219
220
+ while ice_result.is_err() {
221
+ ice_result = self.api.get_ice(session)
222
+ .await;
223
224
+ println!("Waiting for ICE result...");
225
+ tokio::time::sleep(std::time::Duration::from_secs(3)).await;
226
+ }
227
228
+ ice_result
229
.map_err(GsError::ApiError)
230
}
231
0 commit comments