File tree 1 file changed +9
-6
lines changed
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) {
85
85
if c .client {
86
86
go func () {
87
87
<- 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)
94
94
}()
95
95
}
96
96
})
@@ -326,12 +326,15 @@ func (c *Conn) writePong(p []byte) error {
326
326
}
327
327
328
328
// Close closes the WebSocket connection with the given status code and reason.
329
+ //
329
330
// It will write a WebSocket close frame with a timeout of 5 seconds.
330
331
// The connection can only be closed once. Additional calls to Close
331
332
// are no-ops.
333
+ //
332
334
// The maximum length of reason must be 125 bytes otherwise an internal
333
335
// error will be sent to the peer. For this reason, you should avoid
334
336
// sending a dynamic reason.
337
+ //
335
338
// Close will unblock all goroutines interacting with the connection.
336
339
func (c * Conn ) Close (code StatusCode , reason string ) error {
337
340
err := c .exportedClose (code , reason )
You can’t perform that action at this time.
0 commit comments