Skip to content
This repository was archived by the owner on Dec 8, 2017. It is now read-only.

Commit 8779903

Browse files
committed
Pass the original pointer to the proxy go routine
1 parent d470374 commit 8779903

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func pipe(r io.Reader, w io.WriteCloser) {
7777
}
7878

7979
// pass a stopChan to the go routine
80-
func proxy(local io.ReadWriteCloser, remoteAddr *net.TCPAddr, stopChan *chan struct{}) {
80+
func proxy(local *net.TCPConn, remoteAddr *net.TCPAddr, stopChan *chan struct{}) {
8181
fmt.Printf("Opening a new connection on remoteAddr, %s\n", remoteAddr)
8282
remote, err := net.DialTCP("tcp", nil, remoteAddr)
8383
if err != nil {

0 commit comments

Comments
 (0)