Skip to content

Commit

Permalink
Fix accept stream
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Nov 9, 2024
1 parent 3e7b3cf commit 5c2a0c4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,10 @@ func (s *Service) NewConnection(ctx context.Context, conn net.Conn, metadata M.M
}
var group task.Group
group.Append0(func(_ context.Context) error {
var stream net.Conn
for {
stream, err = session.Accept()
if err != nil {
return err
stream, aErr := session.Accept()
if aErr != nil {
return aErr
}
streamCtx := s.newStreamContext(ctx, stream)
go func() {
Expand Down

0 comments on commit 5c2a0c4

Please sign in to comment.