mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-12-23 23:55:40 +00:00
put bytes back when done
This commit is contained in:
parent
df0090e32a
commit
5dfc71e1ee
@ -495,6 +495,7 @@ func (sinfo *sessionInfo) sendWorker() {
|
|||||||
// TODO
|
// TODO
|
||||||
var packet []byte
|
var packet []byte
|
||||||
sessionFunc := func() {
|
sessionFunc := func() {
|
||||||
|
defer util.PutBytes(bs)
|
||||||
sinfo.bytesSent += uint64(len(bs))
|
sinfo.bytesSent += uint64(len(bs))
|
||||||
payload, nonce := crypto.BoxSeal(&sinfo.sharedSesKey, bs, &sinfo.myNonce)
|
payload, nonce := crypto.BoxSeal(&sinfo.sharedSesKey, bs, &sinfo.myNonce)
|
||||||
defer util.PutBytes(payload)
|
defer util.PutBytes(payload)
|
||||||
|
Loading…
Reference in New Issue
Block a user