Skip to content

Commit b252637

Browse files
authored
[core] Make field for bandwidth atomic to avoid thread clash (#3093).
1 parent 59e2c9c commit b252637

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

srtcore/congctl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void SrtCongestion::Check()
6060

6161
class LiveCC: public SrtCongestionControlBase
6262
{
63-
int64_t m_llSndMaxBW; //Max bandwidth (bytes/sec)
63+
srt::sync::atomic<int64_t> m_llSndMaxBW; //Max bandwidth (bytes/sec)
6464
srt::sync::atomic<size_t> m_zSndAvgPayloadSize; //Average Payload Size of packets to xmit
6565
size_t m_zMaxPayloadSize;
6666
size_t m_zHeaderSize;

0 commit comments

Comments
 (0)