mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 21:30:16 +02:00
try fix
This commit is contained in:
parent
ea7ed1a2db
commit
f6e2560742
1 changed files with 14 additions and 14 deletions
|
@ -161,20 +161,20 @@ func pipe(conn1 net.Conn, conn2 net.Conn) {
|
||||||
writer2 := bufio.NewWriter(conn2)
|
writer2 := bufio.NewWriter(conn2)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
b1 := <-chan1:
|
b1 := <-chan1
|
||||||
if b1 == nil {
|
if b1 == nil {
|
||||||
return
|
return
|
||||||
}
|
|
||||||
writer2.Write(b1)
|
|
||||||
writer2.Flush()
|
|
||||||
|
|
||||||
// case b2 := <-chan2:
|
|
||||||
// if b2 == nil {
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// writer1.Write(b2)
|
|
||||||
// writer1.Flush()
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
writer2.Write(b1)
|
||||||
|
writer2.Flush()
|
||||||
|
|
||||||
|
// case b2 := <-chan2:
|
||||||
|
// if b2 == nil {
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// writer1.Write(b2)
|
||||||
|
// writer1.Flush()
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue