camput: add debugging for camlistore.org/issue/221

Change-Id: If0ed73cb16409ac5c1f67ffc878038075cb7e432
This commit is contained in:
Brad Fitzpatrick 2013-09-08 18:19:54 -07:00
parent 4270ec4ce5
commit 5c83627a1f
1 changed files with 3 additions and 0 deletions

View File

@ -782,6 +782,9 @@ func (n *node) String() string {
func (n *node) SetPutResult(res *client.PutResult, err error) {
n.mu.Lock()
defer n.mu.Unlock()
if res == nil && err == nil {
panic("SetPutResult called with (nil, nil)")
}
n.res, n.err = res, err
n.cond.Signal()
}