refactor(streaming): improve signal handling and remove unused components
This commit is contained in:
parent
c5d4c4f3e3
commit
75df0e4308
9 changed files with 19 additions and 1056 deletions
|
|
@ -663,6 +663,12 @@ func (p *dataChannelPump) serveRange(streamID uint32, req wire.RangeReqPayload)
|
|||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
p.activeMu.Lock()
|
||||
if p.active == nil {
|
||||
p.activeMu.Unlock()
|
||||
cancel()
|
||||
p.sendRangeEnd(streamID, 3)
|
||||
return
|
||||
}
|
||||
p.active[streamID] = cancel
|
||||
p.activeMu.Unlock()
|
||||
defer func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue