diff options
author | Aliaksandr Valialkin <valyala@gmail.com> | 2016-07-12 12:30:33 +0300 |
---|---|---|
committer | Aliaksandr Valialkin <valyala@gmail.com> | 2016-07-12 12:30:38 +0300 |
commit | 886e5411604884629c566961ea8ed2cec074e4b1 (patch) | |
tree | 600e63baf61ab16a76d4800089dbe6d79ff1d59c /workerpool.go | |
parent | Issue #131: document redirects' following for client functions (diff) | |
download | fasthttp-886e5411604884629c566961ea8ed2cec074e4b1.tar.gz fasthttp-886e5411604884629c566961ea8ed2cec074e4b1.tar.bz2 fasthttp-886e5411604884629c566961ea8ed2cec074e4b1.zip |
Removed 'recover-from-panic' band-aids.
All the panics must be handled by the user code.
Diffstat (limited to 'workerpool.go')
-rw-r--r-- | workerpool.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/workerpool.go b/workerpool.go index e0dd8a6..04245ff 100644 --- a/workerpool.go +++ b/workerpool.go @@ -3,7 +3,6 @@ package fasthttp import ( "net" "runtime" - "runtime/debug" "strings" "sync" "time" @@ -203,13 +202,6 @@ func (wp *workerPool) workerFunc(ch *workerChan) { var c net.Conn defer func() { - if r := recover(); r != nil { - wp.Logger.Printf("panic: %s\nStack trace:\n%s", r, debug.Stack()) - if c != nil { - c.Close() - } - } - wp.lock.Lock() wp.workersCount-- wp.lock.Unlock() |