Clear reference to LogEntry.result after return.

pull/820/head
Ben Johnson 2013-06-25 14:22:23 -06:00
parent e526ed3441
commit 2cf93fd102
1 changed files with 3 additions and 1 deletions

View File

@ -495,7 +495,9 @@ func (s *Server) Do(command Command) (interface{}, error) {
select {
case <-entry.commit:
debugln("[Do] finish!")
return entry.result, nil
result := entry.result
entry.result = nil
return result, nil
case <-time.After(time.Second):
debugln("[Do] fail!")
return nil, errors.New("Command commit fails")