Closed Rigner closed 6 years ago
https://github.com/PSNRigner/discord-rpc-java/blob/master/src/main/java/net/rigner/discordrpc/impl/BaseConnection.java#L36
Lock over this call to be sure 2 threads can't write at the same time.
Actually using a synchrorized method, but since this method is called twice for header and message, it can still cause race conditions. (saw a few while testing)
https://github.com/PSNRigner/discord-rpc-java/blob/master/src/main/java/net/rigner/discordrpc/impl/BaseConnection.java#L36
Lock over this call to be sure 2 threads can't write at the same time.
Actually using a synchrorized method, but since this method is called twice for header and message, it can still cause race conditions. (saw a few while testing)