Skip to content

Commit

Permalink
fixed deadlock while setting all cookies;
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanfinn committed Oct 5, 2023
1 parent 6fecb6c commit 0d9d566
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions jar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0d9d566

Please sign in to comment.