Skip to content

Commit cf9880b

Browse files
conference: use time.Before() instead of time.After()
Co-authored-by: Šimon Brandner <[email protected]>
1 parent 402f9b8 commit cf9880b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/conference/peer_message_processor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (c *Conference) processRTCPPackets(msg peer.RTCPReceived) {
112112

113113
for _, participant := range c.participants {
114114
if published, ok := participant.publishedTracks[msg.TrackID]; ok {
115-
if published.canSendKeyframeAt.After(time.Now()) {
115+
if published.canSendKeyframeAt.Before(time.Now()) {
116116
if err := participant.peer.WriteRTCP(msg.TrackID, msg.Packets); err == nil {
117117
published.canSendKeyframeAt = time.Now().Add(sendKeyFrameInterval)
118118
}

0 commit comments

Comments
 (0)