5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-26 03:41:37 +00:00

send a message to the sessions to update mtu instead of trying to update it directly

This commit is contained in:
Arceliar 2019-11-21 19:23:44 -06:00
parent d3a2087e0f
commit 248a08b2f1

View File

@ -136,7 +136,10 @@ func (ss *sessions) init(r *router) {
func (ss *sessions) reconfigure() {
ss.router.Act(nil, func() {
for _, session := range ss.sinfos {
session.myMTU = ss.myMaximumMTU
sinfo, mtu := session, ss.myMaximumMTU
sinfo.Act(ss.router, func() {
sinfo.myMTU = mtu
})
session.ping(ss.router)
}
})