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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user