summaryrefslogtreecommitdiff
path: root/opendc-kernel-omega
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2018-02-16 14:32:16 +0100
committerFabian Mastenbroek <mail.fabianm@gmail.com>2018-02-16 14:39:40 +0100
commit2fa0134773a99394aae0efc167af6767e2828c71 (patch)
tree518a61a6b0ce724af18d15d91aeb60a162ebdaa2 /opendc-kernel-omega
parent99dc5592bbca0f7d3a9d411268608c112b135896 (diff)
refactor(#18): Fix broken receive() timeout
This change fixes the broken implementation of the `receive()` method with a timeout due to an invalid condition.
Diffstat (limited to 'opendc-kernel-omega')
-rw-r--r--opendc-kernel-omega/src/main/kotlin/com/atlarge/opendc/omega/OmegaSimulation.kt2
1 files changed, 1 insertions, 1 deletions
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<M>(bootstrap: Bootstrap<M>) : Simulation<M>, Boot
try {
val received = receiveEnvelope()
- if (received.message == Timeout) {
+ if (received.message != Timeout) {
send.canceled = true
return transform(received, received.message)
}