This commit is contained in:
xtaci
2019-05-12 20:34:42 +08:00
parent e7c6eb17d2
commit e93a1908c1
4 changed files with 5 additions and 7 deletions
+1 -3
View File
@@ -51,9 +51,7 @@ func handleClient(sess *smux.Session, p1 io.ReadWriteCloser, quiet bool) {
die := make(chan struct{})
go func() {
buf := xmitBuf.Get().([]byte)
if _, err := generic.CopyBuffer(dst, src, buf); err != nil {
logln(err)
}
generic.CopyBuffer(dst, src, buf)
xmitBuf.Put(buf)
}()
return die
+1 -1
View File
@@ -9,7 +9,7 @@ require (
github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b // indirect
github.com/tjfoc/gmsm v1.0.1 // indirect
github.com/urfave/cli v1.20.0
github.com/xtaci/kcp-go v5.3.5+incompatible
github.com/xtaci/kcp-go v5.3.6+incompatible
github.com/xtaci/smux v1.2.11
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529
golang.org/x/net v0.0.0-20190509222800-a4d6f7feada5 // indirect
+2
View File
@@ -46,6 +46,8 @@ github.com/xtaci/kcp-go v5.3.4+incompatible h1:vHlrCvUC4nDSGQQxbgzwwF35sup3mKAxr
github.com/xtaci/kcp-go v5.3.4+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.3.5+incompatible h1:PD0cqKLJDAMKgX2qzWfK98fbcrVPYDEdstlY0SN0q20=
github.com/xtaci/kcp-go v5.3.5+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.3.6+incompatible h1:g3/sc8dtbFG6td3W7BTyJNr/5Sb0zMNBFgEtqnSuxmw=
github.com/xtaci/kcp-go v5.3.6+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/smux v1.1.1 h1:ZyIo9XHuHkAeENzHR8yGWC+6xUSCTeP2tPTRE8mnLvc=
github.com/xtaci/smux v1.1.1/go.mod h1:f+nYm6SpuHMy/SH0zpbvAFHT1QoMcgLOsWcFip5KfPw=
github.com/xtaci/smux v1.1.2 h1:AeAzHKqvDeFEcicL9Q06LTjIVW2I55iooUbpDRGHth4=
+1 -3
View File
@@ -79,9 +79,7 @@ func handleClient(p1 *smux.Stream, p2 io.ReadWriteCloser, quiet bool) {
die := make(chan struct{})
go func() {
buf := xmitBuf.Get().([]byte)
if _, err := generic.CopyBuffer(dst, src, buf); err != nil {
logln(err)
}
generic.CopyBuffer(dst, src, buf)
xmitBuf.Put(buf)
}()
return die