Skip to content

Commit 76f114d

Browse files
authored
fix: fixing element removal from waiting list (#43)
1 parent 02c2aba commit 76f114d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sleepingBarber/src/main/kotlin/ac/at/uibk/dps/dapr/barber/waitingroom/WaitingRoomActorImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class WaitingRoomActorImpl(runtimeContext: ActorRuntimeContext<WaitingRoomActorI
2929
if (isBarberSleeping) {
3030
isBarberSleeping = false
3131
client.publishEvent("pubsub", "sit", getMap(waiting[0])).subscribe()
32-
waiting.remove(0)
32+
waiting.removeAt(0)
3333
}
3434
} else {
3535
client.publishEvent("pubsub", "full", getMap(customer)).subscribe()
@@ -47,7 +47,7 @@ class WaitingRoomActorImpl(runtimeContext: ActorRuntimeContext<WaitingRoomActorI
4747
if (!waiting.isEmpty()) {
4848
isBarberSleeping = false
4949
client.publishEvent("pubsub", "sit", getMap(waiting[0])).subscribe()
50-
waiting.remove(0)
50+
waiting.removeAt(0)
5151
}
5252
}
5353

0 commit comments

Comments
 (0)