Skip to content

Commit

Permalink
fix bug found by UT
Browse files Browse the repository at this point in the history
  • Loading branch information
Piasy committed Feb 22, 2025
1 parent de3ddf7 commit 2e63b17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Constants.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object Consts {
const val releaseGroup = "com.piasy"
const val releaseName = "kmp-socketio"
const val releaseVersion = "1.1.2"
const val releaseVersion = "1.1.3"

val androidNS = "$releaseGroup.${releaseName.replace('-', '.')}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,10 @@ class Socket(
recvBuffer.forEach { fireEvent(it) }
recvBuffer.clear()

io.packets(sendBuffer)
sendBuffer.clear()
if (sendBuffer.isNotEmpty()) {
io.packets(sendBuffer)
sendBuffer.clear()
}

super.emit(EVENT_CONNECT)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class PollingXHRTest : BaseTest() {
waitExec(this)
polling.polling.close()
waitExec(this)
waitExec(this, 2500)
waitExec(this, 5000)

coVerify(exactly = 3) { polling.factory.httpRequest(any(), any()) }
Logging.info("XXPXX", "closeOpening verify events")
Expand Down

0 comments on commit 2e63b17

Please sign in to comment.