Skip to content

Commit

Permalink
Merge pull request #3940 from amitmurthy/amitm/privfix
Browse files Browse the repository at this point in the history
sending privhost for worker interconnections
  • Loading branch information
amitmurthy committed Aug 5, 2013
2 parents d340180 + 690fe36 commit 99470a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions base/multi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ type Worker
add_msgs::Array{Any,1}
id::Int
gcflag::Bool
privhost::ByteString
cman::ClusterManager
cman_ctxt
ospid

Worker(host::String, port::Integer, sock::TcpSocket, id::Int) =
new(bytestring(host), uint16(port), sock, IOBuffer(), {}, {}, id, false)
new(bytestring(host), uint16(port), sock, IOBuffer(), {}, {}, id, false, "")
end
Worker(host::String, port::Integer, sock::TcpSocket) =
Worker(host, port, sock, 0)
Expand Down Expand Up @@ -216,7 +217,7 @@ function add_workers(pg::ProcessGroup, w::Array{Any,1})
cman.worker_cb(:register, cman, w[i].cman_ctxt, w[i].id, i)
end
end
all_locs = map(x -> isa(x, Worker) ? (x.host,x.port, x.id) : ("", 0, x.id), pg.workers)
all_locs = map(x -> isa(x, Worker) ? (x.privhost, x.port, x.id) : ("", 0, x.id), pg.workers)
for i=1:numw
send_msg_now(w[i], :join_pgrp, w[i].id, all_locs)
end
Expand Down Expand Up @@ -1025,6 +1026,7 @@ function create_worker(privhost, port, pubhost, stream, config, cman_ctxt)
else
w = Worker(pubhost, port)
end
w.privhost = privhost
w.cman = config[:cman]
w.cman_ctxt = cman_ctxt

Expand Down

0 comments on commit 99470a7

Please sign in to comment.