Comments (4)
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.
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.
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.
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)
- Error on 802.11 packet sniffing on Windows - gopacket
- smpp packet
- Call handle.Close method has been blocked HOT 3
- OSS-Fuzz issue 60340
- in packetsToChannel() Need custom delay
- OSS-Fuzz issue 62021
- A significant packet loss occurs when sending SYN data.
- OSS-Fuzz issue 62523
- Does the func (p *Handle) Close() function clear the BPF filter rule set on the handle?
- ZeroCopy read packet data causes heap allocations in pcapNextPacketEx
- `(*PacketSource).packetsToChannel()` error handling is incomplete HOT 1
- Unable to capture and identify TLS
- how decode mdns?
- Operating system sends duplicate packets HOT 2
- How to download this package? HOT 1
- OSS-Fuzz issue 65370
- example https://github.com/google/gopacket/blob/master/examples/synscan/main.go
- OSS-Fuzz issue 66117
- NgWriter always wraps io.Writer in bufio.Writer HOT 1
- Too many errors on Debian 10 (buster) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopacket.