Fix accept stream

This commit is contained in:
世界 2024-11-09 12:24:55 +08:00
parent 3e7b3cfc51
commit 5c2a0c4fa6
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -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() {