chore: CloseWrite

addon-dailer
liqiang 4 years ago
parent 12449760f4
commit 6d409d0f00

@ -3,6 +3,7 @@ package proxy
import ( import (
"bytes" "bytes"
"io" "io"
"net"
"os" "os"
"strings" "strings"
"sync" "sync"
@ -54,7 +55,12 @@ func Transfer(log *_log.Entry, a, b io.ReadWriteCloser) {
} }
} }
if dstc, ok := dst.(*net.TCPConn); ok {
err = dstc.CloseWrite()
} else {
err = dst.Close() err = dst.Close()
}
select { select {
case <-done: case <-done:
return return

Loading…
Cancel
Save