File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ 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.
88
+ // TODO this does not work if reader errors out so skip for now.
89
+ return
89
90
c .readDataLock <- struct {}{}
90
91
c .writeFrameLock <- struct {}{}
91
92
@@ -326,12 +327,15 @@ func (c *Conn) writePong(p []byte) error {
326
327
}
327
328
328
329
// Close closes the WebSocket connection with the given status code and reason.
330
+ //
329
331
// It will write a WebSocket close frame with a timeout of 5 seconds.
330
332
// The connection can only be closed once. Additional calls to Close
331
333
// are no-ops.
334
+ //
332
335
// The maximum length of reason must be 125 bytes otherwise an internal
333
336
// error will be sent to the peer. For this reason, you should avoid
334
337
// sending a dynamic reason.
338
+ //
335
339
// Close will unblock all goroutines interacting with the connection.
336
340
func (c * Conn ) Close (code StatusCode , reason string ) error {
337
341
err := c .exportedClose (code , reason )
You can’t perform that action at this time.
0 commit comments