Unverified Commit 2b5e4a02 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #44 from ipfs/fix/deadlock

fix deadlock on error
parents 651d8d7e 3494d2b1
......@@ -188,11 +188,13 @@ func (i internalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
re := NewResponseEmitter(w, r.Method, req)
defer re.Close()
// call the command
err = i.root.Call(req, re)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
d := re.(Doner)
......
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