Skip to content

Commit ccff303

Browse files
committed
change mtu
1 parent 2890c00 commit ccff303

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

p2p/transport/webrtc/listener.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,12 @@ func (l *listener) accept(ctx context.Context, addr candidateAddr) (tpt.CapableC
215215
defer cleanup()
216216
return nil, err
217217
}
218-
pc.SetLocalDescription(answer)
218+
219+
err = pc.SetLocalDescription(answer)
220+
if err != nil {
221+
defer cleanup()
222+
return nil, err
223+
}
219224

220225
// await peerconnection connected state
221226
select {

p2p/transport/webrtc/udp_mux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type udpMuxNewAddr struct {
4848
}
4949

5050
const maxAddrSize = 512
51-
const receiveMTU = 8192
51+
const receiveMTU = 1500
5252

5353
// NewUDPMuxNewAddr creates an implementation of UDPMux
5454
func NewUDPMuxNewAddr(params ice.UDPMuxParams, newAddrChan chan candidateAddr) *udpMuxNewAddr {

0 commit comments

Comments
 (0)