goraft/raft — pull request #215 by xiangli-cmu (2014-04-10 01:13:20+00:00)
Title: fix(server.go) check server state before send event to channel

This commit fixs a data race between server.Start() and server.send(). Before this commit, server send might receive on a uninitialized stopped channel. To fix this, we initialize the channel before we change the server state to a running state. Then we check the state before receive on the stopped channel.