Skip to content

Commit

Permalink
Merge pull request #1 from youngSSS/updateJitterGet
Browse files Browse the repository at this point in the history
Return nil when buffer is not initialized
  • Loading branch information
youngSSS authored Apr 17, 2023
2 parents 73d9d52 + 351ae8c commit e0161b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/jitter/packet_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,9 @@ func (p *PacketBuffer) Get() ([]byte, bool, int64) {
p.Lock()
defer p.Unlock()

if p.buffer == nil {
return nil, false, 0
}

return p.buffer.Get()
}

0 comments on commit e0161b9

Please sign in to comment.