[tor-commits] [flashproxy/master] Move logMutex next to the function that uses it.
dcf at torproject.org
dcf at torproject.org
Tue Aug 27 22:19:18 UTC 2013
commit f3e8f5aa168e7331bd492676355a25e0995e2a36
Author: David Fifield <david at bamsoftware.com>
Date: Thu Aug 15 14:04:08 2013 -0700
Move logMutex next to the function that uses it.
---
websocket-transport/src/websocket-server/websocket-server.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/websocket-transport/src/websocket-server/websocket-server.go b/websocket-transport/src/websocket-server/websocket-server.go
index cef86f8..c951c60 100644
--- a/websocket-transport/src/websocket-server/websocket-server.go
+++ b/websocket-transport/src/websocket-server/websocket-server.go
@@ -36,8 +36,6 @@ var ptInfo pt.ServerInfo
// ends, -1 is written.
var handlerChan = make(chan int)
-var logMutex sync.Mutex
-
func usage() {
fmt.Printf("Usage: %s [OPTIONS]\n", os.Args[0])
fmt.Printf("WebSocket server pluggable transport for Tor.\n")
@@ -48,6 +46,8 @@ func usage() {
fmt.Printf(" --port PORT listen on PORT (overrides Tor's requested port).\n")
}
+var logMutex sync.Mutex
+
func Log(format string, v ...interface{}) {
dateStr := time.Now().Format("2006-01-02 15:04:05")
logMutex.Lock()
More information about the tor-commits
mailing list