func (c *ShardedClient) release(rawClient ClientShard, conn net2.ManagedConn) { if rawClient.IsValidState() { conn.ReleaseConnection() } else { conn.DiscardConnection() } }