Skip to content

Commit

Permalink
fixup! Replace a timeout task with timedwait()
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWrigley committed Jan 22, 2025
1 parent 2874281 commit 2be833c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function wait_for_conn(w)
timeout = worker_timeout() - (time() - w.ct_time)
timeout <= 0 && error("peer $(w.id) has not connected to $(myid())")

if timedwait(() -> (@atomic w.state) === WorkerState_connected, timeout) === :timed_out
if timedwait(() -> (@atomic w.state) === W_CONNECTED, timeout) === :timed_out
# Notify any waiters on the state and throw
@lock w.c_state notify(w.c_state)
error("peer $(w.id) didn't connect to $(myid()) within $timeout seconds")

Check warning on line 200 in src/cluster.jl

View check run for this annotation

Codecov / codecov/patch

src/cluster.jl#L199-L200

Added lines #L199 - L200 were not covered by tests
Expand Down

0 comments on commit 2be833c

Please sign in to comment.