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:
Stephen McQuay 2016-02-23 16:57:35 -08:00
parent 8a85c94767
commit 50be2c5b88
1 changed files with 6 additions and 1 deletions

View File

@ -163,7 +163,12 @@ func (c *Client) Play() error {
if err != nil {
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))
if err != nil {
return err