Skip to content

Commit

Permalink
Fix #99: Crash when disconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylwester Zieliński committed Dec 27, 2023
1 parent 9339568 commit 39923df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ object MockEngine {
}

fun cancelConnection(serverDevice: MockServerDevice, clientDevice: ClientDevice) {
val connection = clientConnections[clientDevice]!!
val connection = clientConnections[clientDevice] ?: return //server has already stopped, nothing to do

connection.serverApi.onEvent(
ClientConnectionStateChanged(
Expand Down

0 comments on commit 39923df

Please sign in to comment.