aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/golang.org/x/net/websocket
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-07-15 04:58:17 +0800
committerFelix Lange <fjl@twurst.com>2016-07-15 05:03:40 +0800
commit39b4ef4b02587ca1bd1126300c6ab8b4e92c4ac0 (patch)
tree96ccc3f9d25815928e82b81d6e6e3d690fa972b1 /Godeps/_workspace/src/golang.org/x/net/websocket
parent74be4a62c53891016cc0bbd3f9b5ed5d0539efe4 (diff)
downloadgo-tangerine-39b4ef4b02587ca1bd1126300c6ab8b4e92c4ac0.tar.gz
go-tangerine-39b4ef4b02587ca1bd1126300c6ab8b4e92c4ac0.tar.zst
go-tangerine-39b4ef4b02587ca1bd1126300c6ab8b4e92c4ac0.zip
Godeps: update golang.org/x/net/...
This adds compatibility with Go 1.7, where context has moved into the standard library.
Diffstat (limited to 'Godeps/_workspace/src/golang.org/x/net/websocket')
-rw-r--r--Godeps/_workspace/src/golang.org/x/net/websocket/hybi.go3
-rw-r--r--Godeps/_workspace/src/golang.org/x/net/websocket/websocket.go5
2 files changed, 2 insertions, 6 deletions
diff --git a/Godeps/_workspace/src/golang.org/x/net/websocket/hybi.go b/Godeps/_workspace/src/golang.org/x/net/websocket/hybi.go
index 60bbc8418..8cffdd16c 100644
--- a/Godeps/_workspace/src/golang.org/x/net/websocket/hybi.go
+++ b/Godeps/_workspace/src/golang.org/x/net/websocket/hybi.go
@@ -81,9 +81,6 @@ type hybiFrameReader struct {
func (frame *hybiFrameReader) Read(msg []byte) (n int, err error) {
n, err = frame.reader.Read(msg)
- if err != nil {
- return 0, err
- }
if frame.header.MaskingKey != nil {
for i := 0; i < n; i++ {
msg[i] = msg[i] ^ frame.header.MaskingKey[frame.pos%4]
diff --git a/Godeps/_workspace/src/golang.org/x/net/websocket/websocket.go b/Godeps/_workspace/src/golang.org/x/net/websocket/websocket.go
index da0dd964c..9f9b9a52d 100644
--- a/Godeps/_workspace/src/golang.org/x/net/websocket/websocket.go
+++ b/Godeps/_workspace/src/golang.org/x/net/websocket/websocket.go
@@ -144,6 +144,8 @@ type frameHandler interface {
}
// Conn represents a WebSocket connection.
+//
+// Multiple goroutines may invoke methods on a Conn simultaneously.
type Conn struct {
config *Config
request *http.Request
@@ -207,9 +209,6 @@ func (ws *Conn) Write(msg []byte) (n int, err error) {
}
n, err = w.Write(msg)
w.Close()
- if err != nil {
- return n, err
- }
return n, err
}