[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Flush stdout after each PT line.



commit 17c412fb385708e31c44f8eca9a5779305f4a7f3
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Wed Jul 17 10:47:15 2013 -0700

    Flush stdout after each PT line.
    
    This hadn't been causing a problem when websocket-server was run
    directly by Tor, but I tried running websocket-server as a shell
    subprocess, and the shell wasn't seeing its PT negotiation.
---
 websocket-transport/pt.go |    1 +
 1 file changed, 1 insertion(+)

diff --git a/websocket-transport/pt.go b/websocket-transport/pt.go
index 0ff1644..1319198 100644
--- a/websocket-transport/pt.go
+++ b/websocket-transport/pt.go
@@ -89,6 +89,7 @@ func PtLine(keyword string, v ...string) {
 		buf.WriteString(" " + escape(x))
 	}
 	fmt.Println(buf.String())
+	os.Stdout.Sync()
 }
 
 // All of the Pt*Error functions call os.Exit(1).

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits