Skip to content

Commit

Permalink
tcpserver example fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tprifti committed Jan 22, 2025
1 parent 02bbf30 commit 83d93cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/tcpserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (s *session) readLoop(c *actor.Context) {
copy(msg, buf[:n])

// Send to the handler to process to message
c.Send(c.Parent().Child("handler"), msg)
c.Send(c.Parent().Child("handler/default"), msg)
}
// Loop is done due to error or we need to close due to server shutdown.
c.Send(c.Parent(), &connRem{pid: c.PID()})
Expand Down Expand Up @@ -108,7 +108,7 @@ func (s *server) Receive(c *actor.Context) {
}
s.ln = ln
// start the handler that will handle the incomming messages from clients/sessions.
c.SpawnChild(newHandler, "handler")
c.SpawnChild(newHandler, "handler", actor.WithID("default"))
case actor.Started:
slog.Info("server started", "addr", s.listenAddr)
go s.acceptLoop(c)
Expand Down

0 comments on commit 83d93cc

Please sign in to comment.