don't use net.Errors for streams map error (#5060)

This commit is contained in:
Marten Seemann
2025-04-19 22:16:47 +08:00
committed by GitHub
parent 9e1afd4fb4
commit a1aa369464
4 changed files with 14 additions and 43 deletions

View File

@@ -58,7 +58,7 @@ func (m *outgoingStreamsMap[T]) OpenStream() (T, error) {
// if there are OpenStreamSync calls waiting, return an error here
if len(m.openQueue) > 0 || m.nextStream > m.maxStream {
m.maybeSendBlockedFrame()
return *new(T), streamOpenErr{&StreamLimitReachedError{}}
return *new(T), &StreamLimitReachedError{}
}
return m.openStream(), nil
}