Skip to content

Commit

Permalink
close #4860 - use local deploy for TcpManager child actors. (#4862)
Browse files Browse the repository at this point in the history
* close #4860 - use local deploy for TcpManager child actors.

* Use local deploy for TcpIncomingConnection.

* Use local deploy for Udp actors.

Co-authored-by: Erik Folstad <[email protected]>
Co-authored-by: Aaron Stannard <[email protected]>
  • Loading branch information
3 people authored Mar 29, 2021
1 parent 21762b9 commit b545365
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/Akka/IO/TcpListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected override bool Receive(object message)
{
var saea = message as SocketAsyncEventArgs;
if (saea.SocketError == SocketError.Success)
Context.ActorOf(Props.Create<TcpIncomingConnection>(_tcp, saea.AcceptSocket, _bind.Handler, _bind.Options, _bind.PullMode));
Context.ActorOf(Props.Create<TcpIncomingConnection>(_tcp, saea.AcceptSocket, _bind.Handler, _bind.Options, _bind.PullMode).WithDeploy(Deploy.Local));
saea.AcceptSocket = null;

if (!_socket.AcceptAsync(saea))
Expand Down
4 changes: 2 additions & 2 deletions src/core/Akka/IO/TcpManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ protected override bool Receive(object message)
if (c != null)
{
var commander = Sender;
Context.ActorOf(Props.Create<TcpOutgoingConnection>(_tcp, commander, c));
Context.ActorOf(Props.Create<TcpOutgoingConnection>(_tcp, commander, c).WithDeploy(Deploy.Local));
return true;
}
var b = message as Bind;
if (b != null)
{
var commander = Sender;
Context.ActorOf(Props.Create<TcpListener>(_tcp, commander, b));
Context.ActorOf(Props.Create<TcpListener>(_tcp, commander, b).WithDeploy(Deploy.Local));
return true;
}
var dl = message as DeadLetter;
Expand Down
4 changes: 2 additions & 2 deletions src/core/Akka/IO/UdpManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ protected override bool Receive(object message)
if (b != null)
{
var commander = Sender;
Context.ActorOf(Props.Create(() => new UdpListener(_udp, commander, b)));
Context.ActorOf(Props.Create(() => new UdpListener(_udp, commander, b)).WithDeploy(Deploy.Local));
return true;
}
var s = message as Udp.SimpleSender;
if (s != null)
{
var commander = Sender;
Context.ActorOf(Props.Create(() => new UdpSender(_udp, commander, s.Options)));
Context.ActorOf(Props.Create(() => new UdpSender(_udp, commander, s.Options)).WithDeploy(Deploy.Local));
return true;
}
throw new ArgumentException($"The supplied message of type {message.GetType().Name} is invalid. Only Connect and Bind messages are supported. " +
Expand Down

0 comments on commit b545365

Please sign in to comment.