Skip to content

Commit 5e77add

Browse files
committed
Make Distributed.connect() separate from Sockets.connect()
Due to the use of `import` our `connect()` was just adding a method to `Sockets.connect()`.
1 parent 81108c8 commit 5e77add

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/DistributedNext.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ using Base.Threads: Event
2121

2222
using Serialization, Sockets
2323
import Serialization: serialize, deserialize
24-
import Sockets: connect, wait_connected
2524

2625
@static if VERSION < v"1.11"
2726
using ScopedValues: ScopedValue, @with

src/managers.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,15 +728,15 @@ function connect_to_worker(host::AbstractString, port::Integer)
728728

729729
iptype = typeof(bind_addr)
730730
sock = socket_reuse_port(iptype)
731-
connect(sock, bind_addr, UInt16(port))
731+
Sockets.connect(sock, bind_addr, UInt16(port))
732732

733733
(sock, string(bind_addr))
734734
end
735735

736736

737737
function connect_to_worker_with_tunnel(host::AbstractString, bind_addr::AbstractString, port::Integer, tunnel_user::AbstractString, sshflags, multiplex)
738738
localport = ssh_tunnel(tunnel_user, host, bind_addr, UInt16(port), sshflags, multiplex)
739-
s = connect("localhost", localport)
739+
s = Sockets.connect("localhost", localport)
740740
forward = "$localport:$bind_addr:$port"
741741
(s, bind_addr, forward)
742742
end

src/process_messages.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ end
125125
function process_tcp_streams(r_stream::TCPSocket, w_stream::TCPSocket, incoming::Bool)
126126
Sockets.nagle(r_stream, false)
127127
Sockets.quickack(r_stream, true)
128-
wait_connected(r_stream)
128+
Sockets.wait_connected(r_stream)
129129
if r_stream != w_stream
130130
Sockets.nagle(w_stream, false)
131131
Sockets.quickack(w_stream, true)
132-
wait_connected(w_stream)
132+
Sockets.wait_connected(w_stream)
133133
end
134134
message_handler_loop(r_stream, w_stream, incoming)
135135
end

0 commit comments

Comments
 (0)