Florent Castelli 9bbfe9e5e0 dcsctp: Fix data race in debug logging
The variable instance_count might be accessed from multiple threads when
different PeerConnectionFactory objects are used, which may create
multiple network threads. This is a pattern mostly noticed in tests.

This fixes issues with logging when run under TSAN, it should not have
any production impact.

Bug: chromium:1243702
Change-Id: Iab1412a7907545811a309cab27a3ae23b4718606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251983
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Victor Boivie <boivie@google.com>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36045}
2022-02-22 10:21:26 +00:00
..
2021-05-06 09:38:49 +00:00