Unverified Commit a8212f94 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #54 from ipfs/fix/insanity

[RFC] don't generate a stack trace for every command
parents b2bc9cf7 f543e81a
......@@ -5,7 +5,6 @@ import (
"fmt"
"io"
"os"
"runtime/debug"
"sync"
"github.com/ipfs/go-ipfs-cmdkit"
......@@ -88,15 +87,13 @@ func (re *responseEmitter) isClosed() bool {
}
func (re *responseEmitter) Close() error {
if re.isClosed() {
return errors.New("closing closed responseemitter")
}
log.Debugf("err=%v exit=%v\nStack:\n%s", re.err, re.exit, debug.Stack())
re.wLock.Lock()
defer re.wLock.Unlock()
if re.closed {
return errors.New("closing closed responseemitter")
}
re.ch <- re.exit
close(re.ch)
......@@ -172,7 +169,6 @@ func (re *responseEmitter) Emit(v interface{}) error {
}
if err, ok := v.(cmdkit.Error); ok {
log.Warningf("fixerr %s", debug.Stack())
v = &err
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment