Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-cmds
Commits
a8212f94
Unverified
Commit
a8212f94
authored
Jan 11, 2018
by
Steven Allen
Committed by
GitHub
Jan 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #54 from ipfs/fix/insanity
[RFC] don't generate a stack trace for every command
parents
b2bc9cf7
f543e81a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
cli/responseemitter.go
cli/responseemitter.go
+4
-8
No files found.
cli/responseemitter.go
View file @
a8212f94
...
...
@@ -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
\n
Stack:
\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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment