Skip to content

fix(pool): handle broken connection streams and allow custom server name - #62

Open
doanhidm1 wants to merge 1 commit into
MariaDB:mainfrom
doanhidm1:main
Open

fix(pool): handle broken connection streams and allow custom server name#62
doanhidm1 wants to merge 1 commit into
MariaDB:mainfrom
doanhidm1:main

Conversation

@doanhidm1

Copy link
Copy Markdown

Summary of Changes

  • Connection Pool (src/custom_connection.py): Check conn._stream_broken instead of accessing _reader directly in SafePool.fill_free_pool() to avoid missing attribute errors on custom connection implementations. Safely close recycled connections with ensure_closed().
  • Server Configuration (src/server.py): Support dynamic server naming via the MCP_SERVER_NAME environment variable (default: MariaDB_Server). Updated tool docstrings.
  • Tests (src/tests/test_query_validation.py): Added unit test TestSafePool to verify discarding of broken connections in the free pool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant