File tree Expand file tree Collapse file tree 16 files changed +105
-6
lines changed
data-channels-flow-control
play-from-disk-renegotiation Expand file tree Collapse file tree 16 files changed +105
-6
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,12 @@ func main() {
100
100
fmt .Println ("Peer Connection has gone to failed exiting" )
101
101
os .Exit (0 )
102
102
}
103
+
104
+ if s == webrtc .PeerConnectionStateClosed {
105
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
106
+ fmt .Println ("Peer Connection has gone to closed exiting" )
107
+ os .Exit (0 )
108
+ }
103
109
})
104
110
105
111
// Set the handler for Peer connection state
Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ func main() {
62
62
fmt .Println ("Peer Connection has gone to failed exiting" )
63
63
os .Exit (0 )
64
64
}
65
+
66
+ if s == webrtc .PeerConnectionStateClosed {
67
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
68
+ fmt .Println ("Peer Connection has gone to closed exiting" )
69
+ os .Exit (0 )
70
+ }
65
71
})
66
72
67
73
// Register data channel creation handling
Original file line number Diff line number Diff line change @@ -172,6 +172,12 @@ func main() {
172
172
fmt .Println ("Peer Connection has gone to failed exiting" )
173
173
os .Exit (0 )
174
174
}
175
+
176
+ if s == webrtc .PeerConnectionStateClosed {
177
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
178
+ fmt .Println ("Peer Connection has gone to closed exiting" )
179
+ os .Exit (0 )
180
+ }
175
181
})
176
182
177
183
// Set the handler for Peer connection state
@@ -186,6 +192,12 @@ func main() {
186
192
fmt .Println ("Peer Connection has gone to failed exiting" )
187
193
os .Exit (0 )
188
194
}
195
+
196
+ if s == webrtc .PeerConnectionStateClosed {
197
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
198
+ fmt .Println ("Peer Connection has gone to closed exiting" )
199
+ os .Exit (0 )
200
+ }
189
201
})
190
202
191
203
// Now, create an offer
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ func main() {
48
48
fmt .Println ("Peer Connection has gone to failed exiting" )
49
49
os .Exit (0 )
50
50
}
51
+
52
+ if s == webrtc .PeerConnectionStateClosed {
53
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
54
+ fmt .Println ("Peer Connection has gone to closed exiting" )
55
+ os .Exit (0 )
56
+ }
51
57
})
52
58
53
59
// Register data channel creation handling
Original file line number Diff line number Diff line change @@ -126,6 +126,12 @@ func main() {
126
126
fmt .Println ("Peer Connection has gone to failed exiting" )
127
127
os .Exit (0 )
128
128
}
129
+
130
+ if s == webrtc .PeerConnectionStateClosed {
131
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
132
+ fmt .Println ("Peer Connection has gone to closed exiting" )
133
+ os .Exit (0 )
134
+ }
129
135
})
130
136
131
137
// Wait for the offer to be pasted
Original file line number Diff line number Diff line change @@ -147,6 +147,12 @@ func main() { // nolint:gocognit
147
147
fmt .Println ("Peer Connection has gone to failed exiting" )
148
148
os .Exit (0 )
149
149
}
150
+
151
+ if s == webrtc .PeerConnectionStateClosed {
152
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
153
+ fmt .Println ("Peer Connection has gone to closed exiting" )
154
+ os .Exit (0 )
155
+ }
150
156
})
151
157
152
158
// Register data channel creation handling
Original file line number Diff line number Diff line change @@ -132,6 +132,12 @@ func main() { //nolint:gocognit
132
132
fmt .Println ("Peer Connection has gone to failed exiting" )
133
133
os .Exit (0 )
134
134
}
135
+
136
+ if s == webrtc .PeerConnectionStateClosed {
137
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
138
+ fmt .Println ("Peer Connection has gone to closed exiting" )
139
+ os .Exit (0 )
140
+ }
135
141
})
136
142
137
143
// Register channel opening handling
Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ func main() {
140
140
fmt .Println ("Peer Connection has gone to failed exiting" )
141
141
os .Exit (0 )
142
142
}
143
+
144
+ if s == webrtc .PeerConnectionStateClosed {
145
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
146
+ fmt .Println ("Peer Connection has gone to closed exiting" )
147
+ os .Exit (0 )
148
+ }
143
149
})
144
150
145
151
http .Handle ("/" , http .FileServer (http .Dir ("." )))
Original file line number Diff line number Diff line change @@ -238,6 +238,12 @@ func main() {
238
238
fmt .Println ("Peer Connection has gone to failed exiting" )
239
239
os .Exit (0 )
240
240
}
241
+
242
+ if s == webrtc .PeerConnectionStateClosed {
243
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
244
+ fmt .Println ("Peer Connection has gone to closed exiting" )
245
+ os .Exit (0 )
246
+ }
241
247
})
242
248
243
249
// Wait for the offer to be pasted
Original file line number Diff line number Diff line change @@ -139,6 +139,12 @@ func main() {
139
139
fmt .Println ("Peer Connection has gone to failed exiting" )
140
140
os .Exit (0 )
141
141
}
142
+
143
+ if s == webrtc .PeerConnectionStateClosed {
144
+ // PeerConnection was explicitly closed. This usually happens from a DTLS CloseNotify
145
+ fmt .Println ("Peer Connection has gone to closed exiting" )
146
+ os .Exit (0 )
147
+ }
142
148
})
143
149
144
150
// Create an answer
You can’t perform that action at this time.
0 commit comments