Skip to content
Snippets Groups Projects

Fix hang at startup

Open Gedsh requested to merge Gedsh/conjure:fix_hang_at_startup into main
2 unresolved threads
2 files
+ 69
12
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 8
1
@@ -56,7 +56,14 @@ func (c *BufferedConn) SetConn(conn net.Conn) error {
return err
}
go func() {
io.Copy(c.wp, conn)
i, err := io.Copy(c.wp, conn)
if err != nil {
log.Printf("Error receiving from phantom %v", err)
}
log.Printf("Received %d bytes from phantom", i)
//Closing the pipe writer terminates the proxy copy loop and
//forces Tor to reconnect to Conjure to find a new phantom.
c.wp.Close()
}()
log.Printf("Flushed %d bytes from buffer", n)
c.buffer.Reset()
Loading