Commits

Miki Tebeka committed 0b81f8e

check error

Comments (0)

Files changed (1)

 // forward proxies traffic between local socket and remote backend
 func forward(local net.Conn, remoteAddr string) {
 	remote, err := net.Dial("tcp", remoteAddr)
-	if remote == nil {
+	if err != nil {
 		log.Printf("remote dial failed: %v\n", err)
 		local.Close()
 		return