mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 16:01:55 +03:00
Merge pull request #230 from 9seconds/simplify-sockopts
Simplify sockopts
This commit is contained in:
@@ -50,6 +50,8 @@ type ProxyOpts struct {
|
||||
// buffers: to and from.
|
||||
//
|
||||
// This is an optional setting.
|
||||
//
|
||||
// Deprecated: this setting is no longer makes any effect.
|
||||
BufferSize uint
|
||||
|
||||
// Concurrency is a size of the worker pool for connection management.
|
||||
@@ -134,14 +136,6 @@ func (p ProxyOpts) valid() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p ProxyOpts) getBufferSize() int {
|
||||
if p.BufferSize < 1 {
|
||||
return DefaultBufferSize
|
||||
}
|
||||
|
||||
return int(p.BufferSize)
|
||||
}
|
||||
|
||||
func (p ProxyOpts) getConcurrency() int {
|
||||
if p.Concurrency == 0 {
|
||||
return DefaultConcurrency
|
||||
|
||||
Reference in New Issue
Block a user