Skip to content

Commit

Permalink
Remove unnecessary async/await.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Apr 20, 2021
1 parent 11aa046 commit f24eaf0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Desktop.Core/Services/Viewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ public async Task SendScreenCapture(CaptureFrame screenFrame)
ImageBytes = screenFrame.EncodedImageBytes.Skip(i).Take(50_000).ToArray()
};

await SendToViewer(async () => await RtcSession.SendDto(dto),
async () => await CasterSocket.SendDtoToViewer(dto, ViewerConnectionID));
await SendToViewer(() => RtcSession.SendDto(dto),
() => CasterSocket.SendDtoToViewer(dto, ViewerConnectionID));
}

var endOfFrameDto = new CaptureFrameDto()
Expand All @@ -258,8 +258,8 @@ await SendToViewer(async () => await RtcSession.SendDto(dto),
};

await SendToViewer(
async () => await RtcSession.SendDto(endOfFrameDto),
async () => await CasterSocket.SendDtoToViewer(endOfFrameDto, ViewerConnectionID));
() => RtcSession.SendDto(endOfFrameDto),
() => CasterSocket.SendDtoToViewer(endOfFrameDto, ViewerConnectionID));

sw.Stop();

Expand Down

0 comments on commit f24eaf0

Please sign in to comment.