[gunzemulator] r356 committed - Lowered the time required for a connection to be active.

0 views
Skip to first unread message

gunzem...@googlecode.com

unread,
Jun 28, 2010, 12:13:50 PM6/28/10
to gogo-dev...@googlegroups.com
Revision: 356
Author: cg.wowus.cg
Date: Mon Jun 28 09:13:07 2010
Log: Lowered the time required for a connection to be active.
http://code.google.com/p/gunzemulator/source/detail?r=356

Modified:
/trunk/include/database/MySQLGunzDB.h

=======================================
--- /trunk/include/database/MySQLGunzDB.h Mon Jun 28 09:05:58 2010
+++ /trunk/include/database/MySQLGunzDB.h Mon Jun 28 09:13:07 2010
@@ -63,18 +63,20 @@
boost::function<ResultType (const mysqlpp::StoreQueryResult&)>
ResultHandler
)
{
+ mysqlpp::StoreQueryResult result;
+
try
{
- // TODO: Does the ResultHandler have to have an active connection to
- // work properly? Hell if I know. I just did this to be safe.
scoped_connection c(connectionPool);
- return ResultHandler(QueryMaker(*(c.connection)).store());
+ result = QueryMaker(*(c.connection)).store();
}
catch(const mysqlpp::Exception& ex)
{
logger->error(boost::format("MySQL Error: %1%") % ex.what());
throw InternalDatabaseError();
}
+
+ return ResultHandler(result);
}

/**

Reply all
Reply to author
Forward
0 new messages