https://bz.apache.org/bugzilla/show_bug.cgi?id=56026
--- Comment #13 from a...@bgprotect.com --- I've ran into this issue too and I must say that although tomcat's current behavior doesn't directly contradict the standard, it's very unexpected and goes against simple common sense. This is an async call, and Session must be thread safe according to the spec. I can accept that there could be some uncertainty if one mixes sync and async sends, especially in partial messages, but if all calls are async this *really* should never happen. What's worse, as others have mentioned, this goes against what other implementations are doing without as much as documenting this behavior. Neither "Session"'s nor "RemoteEndpoint.Async"'s Javadoc have anything to say about thread safety or specifically the lack thereof. Does the race condition occur only during the call to sendText()/sendBinary()? i.e. Would synchronizing such calls on the session object (as balusc suggested) solve 100% of these cases? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org