[tor-commits] [flashproxy/master] fmt.

dcf at torproject.org dcf at torproject.org
Wed Jan 30 22:18:45 UTC 2013


commit 721e7f78d8e74ebec3a4a07e663457a425c5c7a2
Author: David Fifield <david at bamsoftware.com>
Date:   Mon Jan 28 22:11:34 2013 -0800

    fmt.
---
 websocket-transport/websocket.go |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/websocket-transport/websocket.go b/websocket-transport/websocket.go
index b8c3e9d..6d7d4a1 100644
--- a/websocket-transport/websocket.go
+++ b/websocket-transport/websocket.go
@@ -79,14 +79,14 @@ type Websocket struct {
 	Conn  net.Conn
 	Bufrw *bufio.ReadWriter
 	// Whether we are a client or a server has implications for masking.
-	IsClient       bool
+	IsClient bool
 	// Set from a parent WebsocketConfig.
 	MaxMessageSize int
 	// The single selected subprotocol after negotiation, or "".
-	Subprotocol    string
+	Subprotocol string
 	// Buffer for message payloads, which may be interrupted by control
 	// messages.
-	messageBuf     bytes.Buffer
+	messageBuf bytes.Buffer
 }
 
 func applyMask(payload []byte, maskKey [4]byte) {
@@ -201,9 +201,9 @@ func (ws *Websocket) ReadMessage() (message WebsocketMessage, err error) {
 				return
 			}
 		}
-		if ws.messageBuf.Len() + len(frame.Payload) > ws.MaxMessageSize {
+		if ws.messageBuf.Len()+len(frame.Payload) > ws.MaxMessageSize {
 			err = errors.New(fmt.Sprintf("message payload length of %d exceeds maximum of %d",
-				ws.messageBuf.Len() + len(frame.Payload), ws.MaxMessageSize))
+				ws.messageBuf.Len()+len(frame.Payload), ws.MaxMessageSize))
 			return
 		}
 		ws.messageBuf.Write(frame.Payload)



More information about the tor-commits mailing list