Skip to content

Commit

Permalink
Send will also in closedGracefully function as a disconnect might not…
Browse files Browse the repository at this point in the history
… have been sent by the client
  • Loading branch information
davidepianca98 committed Mar 3, 2020
1 parent 0f9a41b commit 0bb9233
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/commonMain/kotlin/mqtt/broker/ClientConnection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class ClientConnection(

fun closedGracefully() {
close()
broker.sendWill(broker.sessions[clientId])
}

private fun close() {
Expand Down

0 comments on commit 0bb9233

Please sign in to comment.