Git Product home page Git Product logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 2, 2024
Given that main calls scan() only once, then exits, I'm not sure I'd 
particularly call it "leaking" a goroutine, since it exits within 10 seconds 
and all goroutines then die.

That said, I'd happily accept a patch that wouldn't leak the goroutine were the 
scan call in main looped :)

Going to mark WontFix for now, but please feel free to push back if you feel 
that I've misunderstood the issue you pointed out.  Thanks for the report!

Original comment by [email protected] on 26 Jun 2014 at 5:55

  • Changed state: WontFix

from gopacket.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 2, 2024
The point being entirely that this is example code in a google-signed project 
and me being new to Go and getting confused: I was looking at the code and 
thought "oh look, a simple pattern for garbage collected iterators in go" until 
someone on #go-nuts confirmed that the goroutine created by ips() would live 
forever.

You may want to place a comment on #149 in writeARP() to stop people from 
wondering if this is clever or a bug.

Original comment by [email protected] on 26 Jun 2014 at 6:08

from gopacket.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 2, 2024
Great idea.

I've added a comment to the readARP function, see 
https://code.google.com/p/gopacket/source/browse/examples/arpscan/arpscan.go?spe
c=svna3a121d10b80daec124b134718311288bbe23ecb&r=a3a121d10b80daec124b134718311288
bbe23ecb#101

Original comment by [email protected] on 26 Jun 2014 at 3:56

from gopacket.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 2, 2024
Whoops, I commented on the wrong goroutine leak ;)

I've fixed ips() to return a slice in 
https://code.google.com/p/gopacket/source/detail?r=724ba5139a6c4c7e115844941d5db
279320bc08a

Original comment by [email protected] on 26 Jun 2014 at 4:02

from gopacket.

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.