Thread safety for MTU API functions

This commit is contained in:
Neil Alexander 2019-11-21 09:28:36 +00:00
parent e90be6f569
commit d1c445dc41
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 11 additions and 12 deletions

View file

@ -189,8 +189,6 @@ func (ss *sessions) createSession(theirPermKey *crypto.BoxPubKey) *sessionInfo {
sinfo.mySesPriv = *priv
sinfo.myNonce = *crypto.NewBoxNonce()
sinfo.theirMTU = 1280
// TODO: sinfo.myMTU becomes unnecessary if we always have a reference to the
// sessions struct so let's check if that is the case
sinfo.myMTU = ss.myMaximumMTU
now := time.Now()
sinfo.timeOpened = now