Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
rtc::ToString
instead of std::to_string
in `SocketAddress::Po…
…rtAsString()` Justification for this change is that `std::to_string` should be avoided as it uses the user's locale and calls to it get serialized, which is bad for concurrency. My actual motivation for this is quite bizarre. Before this change, with Zed's use of the LiveKit Rust SDK, I was getting connection strings that were not valid utf-8, instead having a port of `3\u0000\u0000\u001c\u0000`. I have not figured out how that could happen or why this change fixes it.
- Loading branch information
08f7a70
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisiting this when looking into zed-industries/zed#23247. I see Max opened an issue on Livekit's repo about challenges with linking other C code while also using livekit - livekit/rust-sdks#364 not sure how that was resolved. Maybe that's related to the need to have this patch?