1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-24 08:02:33 +03:00
This commit is contained in:
Zack Scholl 2018-09-26 09:42:45 -07:00
parent f6e2560742
commit ecf8cbcdda

View File

@ -158,15 +158,16 @@ func pipe(conn1 net.Conn, conn2 net.Conn) {
chan1 := chanFromConn(conn1)
// chan2 := chanFromConn(conn2)
// writer1 := bufio.NewWriter(conn1)
writer2 := bufio.NewWriter(conn2)
// writer2 := bufio.NewWriter(conn2)
for {
b1 := <-chan1
if b1 == nil {
return
}
writer2.Write(b1)
writer2.Flush()
conn2.Write(b1)
// writer2.Write(b1)
// writer2.Flush()
// case b2 := <-chan2:
// if b2 == nil {