don't block on dealing with StateStream
some clients don't use it. we block indefinitely if we don't allow for it to not be used.
This commit is contained in:
parent
8a85c94767
commit
50be2c5b88
@ -163,7 +163,12 @@ func (c *Client) Play() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.New(fmt.Sprintf("%s: Connection likely lost: %s", c.Name, err))
|
return errors.New(fmt.Sprintf("%s: Connection likely lost: %s", c.Name, err))
|
||||||
}
|
}
|
||||||
c.StateStream <- bs
|
|
||||||
|
select {
|
||||||
|
case c.StateStream <- bs:
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
|
||||||
err = c.enc.Encode(c.Update(bs))
|
err = c.enc.Encode(c.Update(bs))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user