http3: use the stream context to detect when the send side is closed (#4489)

This commit is contained in:
Marten Seemann
2024-05-05 10:15:35 +08:00
committed by GitHub
parent c7b58b568f
commit bb6f066aa5
7 changed files with 111 additions and 33 deletions

View File

@@ -85,9 +85,9 @@ start:
d.mx.Unlock()
return data, nil
}
if d.receiveErr != nil {
if receiveErr := d.receiveErr; receiveErr != nil {
d.mx.Unlock()
return nil, d.receiveErr
return nil, receiveErr
}
d.mx.Unlock()