goraft/raft — pull request #213 by xiangli-cmu (2014-04-05 22:58:05+00:00)
Title: fix(server.go) fix incorrect stateChangeEvent dispatching

Fix a bug introduced by race fix. The setState function will be called even if there is no actual stateChange. Check the previous state before dispatching the event.