From 0d9d566c49a3cbf28620cac8ee84372d35a28934 Mon Sep 17 00:00:00 2001 From: Bogdan Finn Date: Thu, 5 Oct 2023 08:36:36 +0200 Subject: [PATCH] fixed deadlock while setting all cookies; --- jar.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/jar.go b/jar.go index cd15b80..7efd94a 100644 --- a/jar.go +++ b/jar.go @@ -174,9 +174,6 @@ func (jar *cookieJar) GetAllCookies() map[string][]*http.Cookie { } func (jar *cookieJar) SetAllCookies(cookies map[string][]*http.Cookie) { - jar.Lock() - defer jar.Unlock() - for urlString, urlCookies := range cookies { u, err := url.Parse(urlString) if err != nil { @@ -303,9 +300,6 @@ func (jar *httpCookieJar) GetAllCookies() map[string][]*http.Cookie { } func (jar *httpCookieJar) SetAllCookies(cookies map[string][]*http.Cookie) { - jar.Lock() - defer jar.Unlock() - for urlString, urlCookies := range cookies { u, err := url.Parse(urlString) if err != nil {