Skip to content

Commit ec8d043

Browse files
committed
Config for MaxWaitConnections
1 parent 49a4a6a commit ec8d043

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ func newServerFromHandler(cfg Config, e *sqle.Engine, sm *SessionManager, handle
158158
ConnReadTimeout: cfg.ConnReadTimeout,
159159
ConnWriteTimeout: cfg.ConnWriteTimeout,
160160
MaxConns: cfg.MaxConnections,
161+
MaxWaitConns: cfg.MaxWaitConnections,
161162
ConnReadBufferSize: mysql.DefaultConnBufferSize,
162163
AllowClearTextWithoutTLS: cfg.AllowClearTextWithoutTLS,
163164
}

server/server_config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ type Config struct {
5757
ConnWriteTimeout time.Duration
5858
// MaxConnections is the maximum number of simultaneous connections that the server will allow.
5959
MaxConnections uint64
60+
// MaxWaitConnections is the maximum number of simultaneous connections that the server will allow to block waiting
61+
// for a connection before new connections result in immediate rejection.
62+
MaxWaitConnections uint32
6063
// TLSConfig is the configuration for TLS on this server. If |nil|, TLS is not supported.
6164
TLSConfig *tls.Config
6265
// RequestSecureTransport will require incoming connections to be TLS. Requires non-|nil| TLSConfig.

0 commit comments

Comments
 (0)