Repository navigation
Commit 2385111
committed
Close connections that stay idle after login
The login timeout only covered clients that had not logged in yet, so a
logged-in client could stay connected without sending anything and keep one of
the connection slots forever.
Give every connection a single deadline: LOGIN_TIMEOUT until it logs in, then
IDLE_TIMEOUT after each request. The idle limit matches MySQL's wait_timeout
default of 8 hours. Data from a client that has not logged in does not extend
its login deadline.1 parent 53c22a7 commit 2385111
3 files changed
Lines changed: 501 additions & 117 deletions
File tree
- packages/mysql-proxy
- src
- tests
0 commit comments