File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,12 @@ func (c *Conn) close(err error) {
8585 if c .client {
8686 go func () {
8787 <- c .readLoopDone
88- // TODO this does not work if reader errors out.
89- c .readDataLock <- struct {}{}
90- c .writeFrameLock <- struct {}{}
91-
92- returnBufioReader (c .br )
93- returnBufioWriter (c .bw )
88+ // TODO this does not work if reader errors out so skip for now .
89+ // c.readDataLock <- struct{}{}
90+ // c.writeFrameLock <- struct{}{}
91+ //
92+ // returnBufioReader(c.br)
93+ // returnBufioWriter(c.bw)
9494 }()
9595 }
9696 })
@@ -326,12 +326,15 @@ func (c *Conn) writePong(p []byte) error {
326326}
327327
328328// Close closes the WebSocket connection with the given status code and reason.
329+ //
329330// It will write a WebSocket close frame with a timeout of 5 seconds.
330331// The connection can only be closed once. Additional calls to Close
331332// are no-ops.
333+ //
332334// The maximum length of reason must be 125 bytes otherwise an internal
333335// error will be sent to the peer. For this reason, you should avoid
334336// sending a dynamic reason.
337+ //
335338// Close will unblock all goroutines interacting with the connection.
336339func (c * Conn ) Close (code StatusCode , reason string ) error {
337340 err := c .exportedClose (code , reason )
You can’t perform that action at this time.
0 commit comments