-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hello,
Sometime I get this panic:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x558f1de7c0]
goroutine 2374 [running]:
[github.com/sgrimee/kizcool.(*Kiz).PollEvents(0x4000f99da0](http://github.com/sgrimee/kizcool.(*Kiz).PollEvents(0x4000f99da0)?)
/root/go/pkg/mod/[github.com/sgrimee/kizcool@v0.0.0-20191223231822-10e10a24e73a/kizcool.go:265](http://github.com/sgrimee/kizcool@v0.0.0-20191223231822-10e10a24e73a/kizcool.go:265) +0x90
...
After reading the code:
I see that in DoWithAuth function, at the first c.hc.Do(req) we check the result with checkStatusOk.
After the second call, if a Login occured, we do not.
And actually checkStatusOk ensure that there is a response Body.
(note that addr=0x40 correspond to the offset of Body in http.Response structure).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels