From 690fe36a747ba52d64e0b630ff50f56988b1b1bf Mon Sep 17 00:00:00 2001 From: amitmurthy Date: Mon, 5 Aug 2013 15:17:49 +0530 Subject: [PATCH] sending privhost for worker interconnections --- base/multi.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base/multi.jl b/base/multi.jl index 2703bb6f721fb..e10fe5381f54c 100644 --- a/base/multi.jl +++ b/base/multi.jl @@ -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) @@ -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 @@ -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