GithubHelp home page GithubHelp logo

Data race warning about goreq HOT 9 OPEN

franela avatar franela commented on August 23, 2024
Data race warning

from goreq.

Comments (9)

marcosnils avatar marcosnils commented on August 23, 2024

@Perlence can you update goreq and run the race detector again?. Seems like is something else https://github.com/franela/goreq/blob/master/goreq.go#L314

from goreq.

Perlence avatar Perlence commented on August 23, 2024

I've updated goreq so the master is 8f5efc2. Unfortunately warning's still there:

Write by goroutine 14:
  github.com/franela/goreq.Request.Do()
      /home/ubuntu/.local/go/src/github.com/franela/goreq/goreq.go:323 +0x6ff

from goreq.

marcosnils avatar marcosnils commented on August 23, 2024

@Perlence We found the issue. We'll be fixing this shorty. It won't affect your code unless you are specifying different maxRedirects per request.

from goreq.

rhd avatar rhd commented on August 23, 2024

Hi, I'm seeing the same issue - would love a fix just to clean up the warning.

from goreq.

marcosnils avatar marcosnils commented on August 23, 2024

@rhd we'll fix it shortly.

from goreq.

rrh avatar rrh commented on August 23, 2024

I have independently rediscovered this race condition in my application. I'm at head, eg 72c51a5

Note also that changing the Makefile to run go test --race finds other race conditions as well.

from goreq.

sschepens avatar sschepens commented on August 23, 2024

Yes, there are some race conditions they all come from using DefaultClient and allowing functionallity that should require a new client.
I believe we should add a Client abstraction to goreq and make these things configurable at a global level and allow to create new goreq clients.

from goreq.

rrh avatar rrh commented on August 23, 2024

any progress on this over the weekend?

from goreq.

sschepens avatar sschepens commented on August 23, 2024

@rrh I haven't had time to check this, but those races are hard to tackle without breaking backwards compatibility, that's a bummer.

from goreq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.