aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs')
-rw-r--r--Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs b/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs
index d0bfc886d..69d9fb6ae 100644
--- a/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs
+++ b/Software/Visual_Studio/Tango.WebRTC/WebRtcTransportAdapter.cs
@@ -143,19 +143,31 @@ namespace Tango.WebRTC
else
{
LogManager.Log("Waiting for offer...");
- completed = true;
State = TransportComponentState.Connected;
- completionSource.SetResult(true);
+
+ if (!completed)
+ {
+ completed = true;
+ completionSource.SetResult(true);
+ }
}
}
catch (Exception ex)
{
- completionSource.SetException(ex);
+ if (!completed)
+ {
+ completed = true;
+ completionSource.SetException(ex);
+ }
}
}
else
{
- completionSource.SetResult(true);
+ if (!completed)
+ {
+ completed = true;
+ completionSource.SetResult(true);
+ }
}
});