The isClosedForSend check doesn't guarantee that the subsequent send() of the Close frame is safe. Someone could concurrently call other functions like onClose() itself, or onError, which could close or fail the channel between the check and the send.
What happened?
The
isClosedForSend
check doesn't guarantee that the subsequentsend()
of the Close frame is safe. Someone could concurrently call other functions likeonClose()
itself, oronError
, which could close or fail the channel between the check and the send.Reproduction and additional details
No response
Krossbow version
5.12.0
Krossbow modules
krossbow-websocket-core
Kotlin version
1.9.23
Kotlin target platforms
All targets / irrelevant