Skip to content

Commit 6692fc4

Browse files
committed
Config pass through for MaxWaitConnsTimeout
1 parent ec8d043 commit 6692fc4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

server/server.go

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

server/server_config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ type Config struct {
6060
// MaxWaitConnections is the maximum number of simultaneous connections that the server will allow to block waiting
6161
// for a connection before new connections result in immediate rejection.
6262
MaxWaitConnections uint32
63+
// MaxWaitConnectionsTimeout is the maximum amount of time that a connection will block waiting for a connection
64+
MaxWaitConnectionsTimeout time.Duration
6365
// TLSConfig is the configuration for TLS on this server. If |nil|, TLS is not supported.
6466
TLSConfig *tls.Config
6567
// RequestSecureTransport will require incoming connections to be TLS. Requires non-|nil| TLSConfig.

0 commit comments

Comments
 (0)