From 2fa0134773a99394aae0efc167af6767e2828c71 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 16 Feb 2018 14:32:16 +0100 Subject: refactor(#18): Fix broken receive() timeout This change fixes the broken implementation of the `receive()` method with a timeout due to an invalid condition. --- .../src/main/kotlin/com/atlarge/opendc/omega/OmegaSimulation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendc-kernel-omega/src/main/kotlin/com/atlarge/opendc/omega/OmegaSimulation.kt b/opendc-kernel-omega/src/main/kotlin/com/atlarge/opendc/omega/OmegaSimulation.kt index 71b20e34..9c6d4ab3 100644 --- a/opendc-kernel-omega/src/main/kotlin/com/atlarge/opendc/omega/OmegaSimulation.kt +++ b/opendc-kernel-omega/src/main/kotlin/com/atlarge/opendc/omega/OmegaSimulation.kt @@ -300,7 +300,7 @@ internal class OmegaSimulation(bootstrap: Bootstrap) : Simulation, Boot try { val received = receiveEnvelope() - if (received.message == Timeout) { + if (received.message != Timeout) { send.canceled = true return transform(received, received.message) } -- cgit v1.2.3