-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keepalive flag isnt working #683
Comments
Hi, on your steps you have However, and to not open a new issue, I do actually see an issue regarding connections falling back to keepalive, when I specify --rate of 1000 or more, with rate under 500 seems ok but with 1k seems it's reusing connections regardless specifying keepalive false. I did some research and I see Vegeta's code has references to this library https://cs.opensource.google/go/x/net that was in use originally, but since then I think you are using the built in 'net' library (https://github.com/tsenart/vegeta/blob/master/lib/attack.go#L10). However, these two libraries differ on the Dialer function regarding keepalive: original (https://cs.opensource.google/go/x/net/+/master:internal/quic/config.go;l=92):
new (https://pkg.go.dev/[email protected]#Dialer):
so if you are actually using the built in library you should be passing a negative integer here and not a 0 so this works correctly: https://github.com/tsenart/vegeta/blob/master/lib/attack.go#L188 note: I don't usually work with go, this is an educated guess reading through a bit here trying to explain the behavior I'm seeing, hopefully it helps :) |
Hi all, quick update, I did some more testing (using Cheers |
thanks for the reply @Choms
|
yeah, for that to work you need to change this line to be -1 instead of 0 https://github.com/tsenart/vegeta/blob/master/lib/attack.go#L188 then recompile Vegeta :) |
i see, then its a bug, i will wait for the fix, for now i am good with keepalive :-) |
yea it's a bug, not sure if this project is still active though |
Version and Runtime
Expected Behaviour
connections should not have
keepalive
when--keepalive off
is setActual Behaviour
netstat shows keepalive is set for the socket
Steps to Reproduce
netstat -panto |grep :443 |grep ESTA
in another terminal to see connections detailsAdditional Context
The text was updated successfully, but these errors were encountered: