-
Couldn't load subscription status.
- Fork 266
esm exhausted all local ports #7
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
Conversation
fix can't assign requested address
fix can't assign requested address
fix can't assign requested address
bool default no more needed
Add "fields" parameter to output specified field.
Add "fields" parameter to output specified field.
Add "fields" parameter to output specified field.
Add "fields" parameter to output specified field.
Add "fields" parameter to output specified field.
domain.go
Outdated
| ScrollTime string `short:"t" long:"time" description:"scroll time" default:"1m"` | ||
| ScrollSliceSize int `long:"sliced_scroll_size" description:"size of sliced scroll, to make it work, the size should be > 1" default:"1"` | ||
| RecreateIndex bool `short:"f" long:"force" description:"delete destination index before copying" default:"false"` | ||
| RecreateIndex bool `short:"f" long:"force" description:"delete destination index before copying" ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you keep this default to false, same below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, the code of packge go-flags had been changed, boolean flag always default to `false' .
https://github.com/jessevdk/go-flags/blob/master/group.go
if option.isBool() && option.Default != nil {
return newErrorf(ErrInvalidTag,
"boolean flag `%s' may not have default values, they always default to `false' and can only be turned on",
option.shortAndLongName())
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++,Good!
prefer to safe default
fix header
While running esm, it would exhaust all the local ports.
How to repeat:
Set parameter
-cto 1,run esm, after 10 minutes, usenetstatcommand to check the local established connections.After a while, esm raised lots of errors.
This is because, the default HTTP client's Transport does not attempt to reuse HTTP/1.0 or HTTP/1.1 TCP connections ("keep-alive") unless the Body is read to completion and is closed. And the code just calls
resp.Body.Close()and the body isn't cleared.This paper has details about the problem.