{"action":"created","issue":{"url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/528","labels_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/528/labels{/name}","comments_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/528/comments","events_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/528/events","html_url":"https://github.com/brettwooldridge/HikariCP/issues/528","id":123630796,"number":528,"title":"evict broken connection instead of release to pool","user":{"login":"ChinaXing","id":1628109,"avatar_url":"https://avatars.githubusercontent.com/u/1628109?v=3","gravatar_id":"","url":"https://api.github.com/users/ChinaXing","html_url":"https://github.com/ChinaXing","followers_url":"https://api.github.com/users/ChinaXing/followers","following_url":"https://api.github.com/users/ChinaXing/following{/other_user}","gists_url":"https://api.github.com/users/ChinaXing/gists{/gist_id}","starred_url":"https://api.github.com/users/ChinaXing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChinaXing/subscriptions","organizations_url":"https://api.github.com/users/ChinaXing/orgs","repos_url":"https://api.github.com/users/ChinaXing/repos","events_url":"https://api.github.com/users/ChinaXing/events{/privacy}","received_events_url":"https://api.github.com/users/ChinaXing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-23T09:53:34Z","updated_at":"2015-12-23T14:39:51Z","closed_at":null,"body":"I'm use Hikari jdbc connection pool.\r\n\r\nwhen execute statement witch produce an exception ( for example by network is broken). as following:\r\n\r\n```\r\ntry{\r\n   Connection con = pool.getConnection();\r\n   con.executeQuery(\"....\");\r\n}catch(Exception e){\r\n   con.close();\r\n}\r\n```\r\ndoes con.close will evict the broken connection, instead of release it to the pool.\r\n\r\nif the broken connection is released to pool. it maybe got by following request of getConnection."},"comment":{"url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/comments/166913532","html_url":"https://github.com/brettwooldridge/HikariCP/issues/528#issuecomment-166913532","issue_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/528","id":166913532,"user":{"login":"ChinaXing","id":1628109,"avatar_url":"https://avatars.githubusercontent.com/u/1628109?v=3","gravatar_id":"","url":"https://api.github.com/users/ChinaXing","html_url":"https://github.com/ChinaXing","followers_url":"https://api.github.com/users/ChinaXing/followers","following_url":"https://api.github.com/users/ChinaXing/following{/other_user}","gists_url":"https://api.github.com/users/ChinaXing/gists{/gist_id}","starred_url":"https://api.github.com/users/ChinaXing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChinaXing/subscriptions","organizations_url":"https://api.github.com/users/ChinaXing/orgs","repos_url":"https://api.github.com/users/ChinaXing/repos","events_url":"https://api.github.com/users/ChinaXing/events{/privacy}","received_events_url":"https://api.github.com/users/ChinaXing/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T14:39:51Z","updated_at":"2015-12-23T14:39:51Z","body":"@slyoldfox my question is not leaking the con.close() action. \r\n\r\nI means if the con.close() called, the broken connection will still be release to the Pool. which will be got by next getConnection() call.\r\n\r\n"}}