mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
correct way to clear collection
This commit is contained in:
+2
-2
@@ -41,10 +41,10 @@ class WssDataStreamCollector : WebSocketListener() {
|
||||
reason: String,
|
||||
) {
|
||||
super.onClosing(webSocket, code, reason)
|
||||
wssData.removeAll(wssData)
|
||||
wssData.clear()
|
||||
}
|
||||
|
||||
fun canStream(): Boolean = wssData.size > 0
|
||||
fun canStream(): Boolean = wssData.isNotEmpty()
|
||||
|
||||
fun getNextStream(): ByteString = wssData.pollFirst()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user