opti
This commit is contained in:
parent
dfeba31404
commit
d03e08b466
11
ws/client.go
11
ws/client.go
|
@ -257,15 +257,16 @@ func (c *client) close(status MessageError, clientACK bool){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (2) kill reader if still running */
|
/* (2) kill writer' if still running */
|
||||||
c.io.sock.SetReadDeadline(time.Now().Add(time.Second*-1))
|
|
||||||
c.io.reading.Wait()
|
|
||||||
|
|
||||||
/* (3) kill writer' if still running */
|
|
||||||
if c.io.writing {
|
if c.io.writing {
|
||||||
close(c.ch.send)
|
close(c.ch.send)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (3) kill reader if still running */
|
||||||
|
c.io.sock.SetReadDeadline(time.Now().Add(time.Second*-1))
|
||||||
|
c.io.reading.Wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if status == NONE {
|
if status == NONE {
|
||||||
status = NORMAL
|
status = NORMAL
|
||||||
|
|
Loading…
Reference in New Issue