mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-10-04 15:03:01 +08:00
refactor: add additional [2]byte for packet length (#554)
This commit is contained in:
@@ -262,7 +262,7 @@ func copyStream(ctx context.Context, local net.Conn, remote net.Conn) {
|
||||
if err != nil && !errors.Is(err, net.ErrClosed) && !errors.Is(err, io.EOF) {
|
||||
plog.G(ctx).Debugf("Failed to copy remote -> local: %s", err)
|
||||
}
|
||||
pkgutil.SafeWrite(chDone, true)
|
||||
chDone <- true
|
||||
}()
|
||||
|
||||
// start local -> remote data transfer
|
||||
@@ -273,7 +273,7 @@ func copyStream(ctx context.Context, local net.Conn, remote net.Conn) {
|
||||
if err != nil && !errors.Is(err, net.ErrClosed) && !errors.Is(err, io.EOF) {
|
||||
plog.G(ctx).Debugf("Failed to copy local -> remote: %s", err)
|
||||
}
|
||||
pkgutil.SafeWrite(chDone, true)
|
||||
chDone <- true
|
||||
}()
|
||||
|
||||
select {
|
||||
|
Reference in New Issue
Block a user