Merge pull request #15 from dcormier/master

Added missing lock when reading field
This commit is contained in:
Gennadiy Kovalev 2017-05-02 15:00:59 +02:00 committed by GitHub
commit 9ad754ba04
1 changed files with 3 additions and 0 deletions

View File

@ -74,6 +74,9 @@ func (c *Channel) Id() string {
Checks that Channel is still alive Checks that Channel is still alive
*/ */
func (c *Channel) IsAlive() bool { func (c *Channel) IsAlive() bool {
c.aliveLock.Lock()
defer c.aliveLock.Unlock()
return c.alive return c.alive
} }