mirror of
https://github.com/jech/galene.git
synced 2024-11-26 02:25:58 +01:00
Remove ErrWriterDead, replace with ErrClientDead.
This commit is contained in:
parent
abb8b70a0d
commit
71022f4b58
1 changed files with 3 additions and 4 deletions
|
@ -1177,8 +1177,7 @@ func clientWriter(conn *websocket.Conn, ch <-chan interface{}, done chan<- struc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var ErrWriterDead = errors.New("client writer died")
|
var ErrClientDead = errors.New("client is dead")
|
||||||
var ErrClientDead = errors.New("client dead")
|
|
||||||
|
|
||||||
func (c *webClient) action(m interface{}) error {
|
func (c *webClient) action(m interface{}) error {
|
||||||
select {
|
select {
|
||||||
|
@ -1194,7 +1193,7 @@ func (c *webClient) write(m clientMessage) error {
|
||||||
case c.writeCh <- m:
|
case c.writeCh <- m:
|
||||||
return nil
|
return nil
|
||||||
case <-c.writerDone:
|
case <-c.writerDone:
|
||||||
return ErrWriterDead
|
return ErrClientDead
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1203,7 +1202,7 @@ func (c *webClient) close(data []byte) error {
|
||||||
case c.writeCh <- closeMessage{data}:
|
case c.writeCh <- closeMessage{data}:
|
||||||
return nil
|
return nil
|
||||||
case <-c.writerDone:
|
case <-c.writerDone:
|
||||||
return ErrWriterDead
|
return ErrClientDead
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue