Open rogerdehe opened 8 years ago
Same with you, and when I upgrade to go1.6+, I met the problem: fatal error: concurrent map read and map
@rogerdehe @wangming1993 you can't use one SuperAgent
concurrently, look at Get
, Post
implementation.
In MeasureZhiji function,use gorequest.New to new a instance
I want to reuse
gorequest.SuperAgent
in my program, so I new areq
, then I always reuse this.This does work at most time,But when I have multiple
goroutine
in linux, this just gotnil pointer dereference
error.Anyway, if I new aSuperAgent
, this is not a problem.And also, something strange is that I just run everything well in myMac
, but not ok in linux.I upload my source code in a txt file. test_http.txt
Here is the stack trace: