From 02fe464c0fc173404771e0e61c5ac0db2a1813d3 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 7 Apr 2021 10:56:23 +0300 Subject: Several bug fixes. --- Software/Visual_Studio/Tango.WebRTC/WebRtcClient.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Software/Visual_Studio/Tango.WebRTC') diff --git a/Software/Visual_Studio/Tango.WebRTC/WebRtcClient.cs b/Software/Visual_Studio/Tango.WebRTC/WebRtcClient.cs index cb4cf174a..19f82b063 100644 --- a/Software/Visual_Studio/Tango.WebRTC/WebRtcClient.cs +++ b/Software/Visual_Studio/Tango.WebRTC/WebRtcClient.cs @@ -181,6 +181,7 @@ namespace Tango.WebRTC if (!_conductor.InitializePeerConnection()) { completion.SetException(new ApplicationException("Error initializing peer connection.")); + return; } _conductor.CreateDataChannel(DataChannelName); @@ -201,21 +202,17 @@ namespace Tango.WebRTC catch (Exception ex) { completion.SetException(ex); + return; } IsInitialized = true; completion.SetResult(true); - //Stopwatch watch = new Stopwatch(); - //watch.Start(); - while (!_isDisposed) { - //watch.Restart(); _conductor.ProcessMessages(1000); Thread.Sleep(10); - //Thread.Sleep(Math.Max(10, (int)watch.ElapsedMilliseconds)); } IsInitialized = false; -- cgit v1.3.1