req := fasthttp.AcquireRequest()
...
err := client.DoTimeout(req, nil, time.Second)
panic: runtime error: invalid memory address or nil pointer dereference
github.com/valyala/fasthttp.clientDoDeadline(0xc000a34000, 0x0, 0xbf23ec19e394166b, 0x3c853c05, 0xe24720, 0xa76c20, 0xc0009f2000, 0xc000a460c0, 0xc000a460c0)
/Users/vesninandrey/go/src/github.com/valyala/fasthttp/client.go:990 +0x211
github.com/valyala/fasthttp.clientDoTimeout(0xc000a34000, 0x0, 0x3b9aca00, 0xa76c20, 0xc0009f2000, 0xc000a460c0, 0x0)
/Users/vesninandrey/go/src/github.com/valyala/fasthttp/client.go:966 +0x7f
github.com/valyala/fasthttp.(*Client).DoTimeout(...)
/Users/vesninandrey/go/src/github.com/valyala/fasthttp/client.go:330
Comment here tells me that i can use nil resp:
https://github.com/valyala/fasthttp/blob/master/client.go#L950
But, after that, here is nil pointer dereference:
https://github.com/valyala/fasthttp/blob/master/client.go#L990
Is that error or i do something wrong?
That is indeed a bug, I'll see if I can commit a fix tonight.
I have just pushed a fix.
Most helpful comment
I have just pushed a fix.