mirror of
https://gitlab.com/comunic/ComunicRTCProxy
synced 2024-12-26 05:28:53 +00:00
Reformat code
This commit is contained in:
parent
1b88b51c23
commit
85ddd9691d
6
relay.go
6
relay.go
@ -228,6 +228,9 @@ func newCall(mainOffer receivedSignal, r *activeRelay) {
|
||||
return
|
||||
}
|
||||
|
||||
// Close peer connection
|
||||
defer mainPeerConnection.Close()
|
||||
|
||||
// Check if the connection is closed
|
||||
mainPeerConnection.OnConnectionStateChange(func(s webrtc.PeerConnectionState) {
|
||||
if s == webrtc.PeerConnectionStateClosed {
|
||||
@ -236,9 +239,6 @@ func newCall(mainOffer receivedSignal, r *activeRelay) {
|
||||
}
|
||||
})
|
||||
|
||||
// Close peer connection
|
||||
defer mainPeerConnection.Close()
|
||||
|
||||
// Forward ice candidates
|
||||
mainPeerConnection.OnICECandidate(func(c *webrtc.ICECandidate) {
|
||||
if c == nil || r.closed {
|
||||
|
Loading…
Reference in New Issue
Block a user