Skip to content

Commit

Permalink
Merge pull request #704 from testwill/map
Browse files Browse the repository at this point in the history
chore: unnecessary guard around call to delete
  • Loading branch information
AlexxIT authored Oct 24, 2023
2 parents df16f28 + dd4376c commit 041ce88
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/webrtc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,7 @@ func inputWebRTC(w http.ResponseWriter, r *http.Request) {
case pion.PeerConnectionState:
if msg == pion.PeerConnectionStateClosed {
stream.RemoveProducer(prod)
if _, ok := sessions[id]; ok {
delete(sessions, id)
}
delete(sessions, id)
}
}
})
Expand Down

0 comments on commit 041ce88

Please sign in to comment.