Skip to content

Commit

Permalink
fix spurious exception printing on custom topologies (JuliaLang#22933)
Browse files Browse the repository at this point in the history
  • Loading branch information
amitmurthy committed Jul 25, 2017
1 parent 79ff734 commit d328a82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions base/distributed/process_messages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,14 @@ function message_handler_loop(r_stream::IO, w_stream::IO, incoming::Bool)
end
catch e
# Check again as it may have been set in a message handler but not propagated to the calling block above
wpid = worker_id_from_socket(r_stream)
if (wpid < 1)
if wpid < 1
wpid = worker_id_from_socket(r_stream)
end

if wpid < 1
println(STDERR, e, CapturedException(e, catch_backtrace()))
println(STDERR, "Process($(myid())) - Unknown remote, closing connection.")
else
elseif !(wpid in map_del_wrkr)
werr = worker_from_id(wpid)
oldstate = werr.state
set_worker_state(werr, W_TERMINATED)
Expand Down
2 changes: 1 addition & 1 deletion test/topology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end

function remove_workers_and_test()
while nworkers() > 0
rmprocs(workers()[1]; waitfor=2.0)
rmprocs(workers()[1])
test_worker_counts()
if nworkers() == nprocs()
break
Expand Down

0 comments on commit d328a82

Please sign in to comment.