Unverified Commit af4399e2 authored by Fan Lin's avatar Fan Lin Committed by GitHub
Browse files

Merge pull request #255 from xyz-li/fix

fix nil writer
parents e706f8df 5afe331b
Showing with 2 additions and 3 deletions
+2 -3
package sshuttle
import (
"bufio"
"fmt"
"io"
"os"
......@@ -43,8 +42,8 @@ func (s *Cli) Connect(remoteHost, privateKeyPath string, remotePort int, DNSServ
stdoutPipe, _ := cmd.StdoutPipe()
stderrPipe, _ := cmd.StderrPipe()
if stdoutPipe != nil && stderrPipe != nil {
go io.Copy(bufio.NewWriter(nil), stdoutPipe)
go io.Copy(bufio.NewWriter(nil), stderrPipe)
go io.Copy(io.Discard, stdoutPipe)
go io.Copy(io.Discard, stderrPipe)
}
}
return cmd
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment