frankvHoof93 / TikTokLiveSharp

Port of TikTok live library for C#
https://vanhoof.dev
Other
139 stars 27 forks source link

Synchronize WebSocket SendAsync calls #43

Closed DanielSvoboda closed 8 months ago

DanielSvoboda commented 8 months ago

Introduces a semaphore to synchronize calls to SendAsync in the WriteMessage method. This ensures that we do not call SendAsync again until the previous operation has completed, which resolves the System.InvalidOperationException we were encountering.

The changes include: