Skip to content
Browse files

forwarder should exit immediately if source db is down

git-svn-id: http://kazuho.31tools.com/svn/incline/trunk@254 4d3e2a30-9d6d-0410-bc8c-dac56cff10b3
  • Loading branch information...
1 parent 7869aa2 commit 6d631291fe509bb7f4a7667a2eec782af6cc250f kazuho committed Nov 4, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/incline_fw_replicator.cc
View
6 src/incline_fw_replicator.cc
@@ -48,6 +48,12 @@ incline_fw_replicator::do_run()
incline_dbms* dest_dbh = NULL;
string last_id;
+ { // establish (delayed) connection, forwarder should exit immediately if
+ // source is down
+ vector<vector<incline_dbms::value_t> > res;
+ dbh_->query(res, "SELECT 1");
+ }
+
while (! mgr()->driver()->should_exit_loop()) {
vector<string> iq_ids;

0 comments on commit 6d63129

Please sign in to comment.
Something went wrong with that request. Please try again.