Skip to content

Commit

Permalink
Put back data channel initialisation for sipsorcery test client.
Browse files Browse the repository at this point in the history
  • Loading branch information
sipsorcery committed Dec 21, 2024
1 parent 4daeb30 commit d4ec686
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sipsorcery/client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static async Task<int> Main(string[] args)

logger.LogDebug($"Performing test {testType} to {echoServerUrl}.");

var pc = CreatePeerConnection();
var pc = await CreatePeerConnection();
var offer = pc.createOffer();
await pc.setLocalDescription(offer);

Expand Down Expand Up @@ -199,7 +199,7 @@ static async Task<int> Main(string[] args)
return (success) ? SUCCESS_RESULT : FAILURE_RESULT;
}

private static RTCPeerConnection CreatePeerConnection()
private static async Task<RTCPeerConnection> CreatePeerConnection()
{
RTCConfiguration config = new RTCConfiguration
{
Expand All @@ -211,7 +211,7 @@ private static RTCPeerConnection CreatePeerConnection()
MediaStreamTrack audioTrack = new MediaStreamTrack(SDPWellKnownMediaFormatsEnum.PCMU);
pc.addTrack(audioTrack);

//var dc = await pc.createDataChannel("sipsocery-dc");
var dc = await pc.createDataChannel("sipsocery-dc");

pc.onicecandidateerror += (candidate, error) => logger.LogWarning($"Error adding remote ICE candidate. {error} {candidate}");
pc.OnTimeout += (mediaType) => logger.LogWarning($"Timeout for {mediaType}.");
Expand Down

0 comments on commit d4ec686

Please sign in to comment.