Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove mutex locks
  • Loading branch information
kylecarbs committed Jan 30, 2022
commit 83434046d84d3d9147e0cd64a0a78cd45386987c
4 changes: 0 additions & 4 deletions peer/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ type Conn struct {
func (c *Conn) init() error {
c.rtc.OnNegotiationNeeded(c.negotiate)
c.rtc.OnICEConnectionStateChange(func(iceConnectionState webrtc.ICEConnectionState) {
c.closeMutex.Lock()
defer c.closeMutex.Unlock()
if c.isClosed() {
return
}
Expand All @@ -152,8 +150,6 @@ func (c *Conn) init() error {
slog.F("state", iceConnectionState))
})
c.rtc.OnICEGatheringStateChange(func(iceGatherState webrtc.ICEGathererState) {
c.closeMutex.Lock()
defer c.closeMutex.Unlock()
if c.isClosed() {
return
}
Expand Down