git » go-net » commit 318395d

websocket: remove redundant error handling

author Sam Whited
2016-04-02 04:21:16 UTC
committer Andrew Gerrand
2016-04-05 03:06:35 UTC
parent afc22ee9133171570a267463982b542fb3edff5a

websocket: remove redundant error handling

Change-Id: I1b0e8812ca5b2e3ca72948d5414d569879e54f35
Reviewed-on: https://go-review.googlesource.com/21461
Reviewed-by: Andrew Gerrand <adg@golang.org>

websocket/websocket.go +0 -3

diff --git a/websocket/websocket.go b/websocket/websocket.go
index e069b33..9412191 100644
--- a/websocket/websocket.go
+++ b/websocket/websocket.go
@@ -209,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
 }