Skip to content

Commit

Permalink
Merge pull request #108 from thaJeztah/carry_6
Browse files Browse the repository at this point in the history
Swap CloseRead and CloseWrite
  • Loading branch information
thaJeztah committed Nov 10, 2023
2 parents 481d3d2 + 7a67a58 commit fa09c95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/tcp_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func (proxy *TCPProxy) clientLoop(client *net.TCPConn, quit chan bool) {
// If the socket we are writing to is shutdown with
// SHUT_WR, forward it to the other end of the pipe:
if err, ok := err.(*net.OpError); ok && err.Err == syscall.EPIPE {
_ = from.CloseWrite()
_ = from.CloseRead()
}
}
_ = to.CloseRead()
_ = to.CloseWrite()
event <- written
}

Expand Down

0 comments on commit fa09c95

Please sign in to comment.