Skip to content

Commit

Permalink
Merge pull request #5 from ghost/patch-1
Browse files Browse the repository at this point in the history
Backend is not set properly with connection pool
  • Loading branch information
mloskot committed Feb 17, 2013
2 parents aac00d4 + f794b4c commit 2bd37b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/session.cpp
Expand Up @@ -125,6 +125,7 @@ void session::open(backend_factory const & factory,
if (isFromPool_)
{
pool_->at(poolPosition_).open(factory, connectString);
backEnd_ = pool_->at(poolPosition_).get_backend();
}
else
{
Expand All @@ -145,6 +146,7 @@ void session::open(std::string const & backendName,
if (isFromPool_)
{
pool_->at(poolPosition_).open(backendName, connectString);
backEnd_ = pool_->at(poolPosition_).get_backend();
}
else
{
Expand All @@ -166,6 +168,7 @@ void session::open(std::string const & connectString)
if (isFromPool_)
{
pool_->at(poolPosition_).open(connectString);
backEnd_ = pool_->at(poolPosition_).get_backend();
}
else
{
Expand All @@ -192,6 +195,7 @@ void session::close()
if (isFromPool_)
{
pool_->at(poolPosition_).close();
backEnd_ = NULL;
}
else
{
Expand All @@ -205,6 +209,7 @@ void session::reconnect()
if (isFromPool_)
{
pool_->at(poolPosition_).reconnect();
backEnd_ = pool_->at(poolPosition_).get_backend();
}
else
{
Expand Down

0 comments on commit 2bd37b4

Please sign in to comment.