Skip to content

Commit

Permalink
fix(client): race conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Feb 28, 2024
1 parent d122be3 commit a140863
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/cookiejar.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ func (cj *CookieJar) parseCookiesFromResp(host, path []byte, resp *fasthttp.Resp
func (cj *CookieJar) Release() {
// FOllOW-UP performance optimization
// currently a race condition is found because the reset method modifies a value which is not a copy but a reference -> solution should be to make a copy
//for _, v := range cj.hostCookies {
// for _, c := range v {
// for _, v := range cj.hostCookies {
// for _, c := range v {
// fasthttp.ReleaseCookie(c)
// }
//}
// }
// }
cj.hostCookies = nil
}

Expand Down

0 comments on commit a140863

Please sign in to comment.