aboutsummaryrefslogtreecommitdiff
path: root/stream.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2016-07-12 12:30:33 +0300
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2016-07-12 12:30:38 +0300
commit886e5411604884629c566961ea8ed2cec074e4b1 (patch)
tree600e63baf61ab16a76d4800089dbe6d79ff1d59c /stream.go
parentIssue #131: document redirects' following for client functions (diff)
downloadfasthttp-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 'stream.go')
-rw-r--r--stream.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/stream.go b/stream.go
index 24bd553..aa23b1a 100644
--- a/stream.go
+++ b/stream.go
@@ -3,7 +3,6 @@ package fasthttp
import (
"bufio"
"io"
- "runtime/debug"
"sync"
"github.com/valyala/fasthttp/fasthttputil"
@@ -42,12 +41,6 @@ func NewStreamReader(sw StreamWriter) io.ReadCloser {
}
go func() {
- defer func() {
- if r := recover(); r != nil {
- defaultLogger.Printf("panic in StreamWriter: %s\nStack trace:\n%s", r, debug.Stack())
- }
- }()
-
sw(bw)
bw.Flush()
pw.Close()