Skip to content

Commit

Permalink
Update port to proxy port
Browse files Browse the repository at this point in the history
  • Loading branch information
justing-bq committed Apr 24, 2023
1 parent e0a86f6 commit 9e6e73c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions driver/failover_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,12 @@ bool FAILOVER_HANDLER::should_connect_to_new_writer(const char* host) {
ds_set_wstrnattr(&dbc->ds->server, (SQLWCHAR*)writer_host_wstr.c_str(), writer_host_wstr.size());
ds_set_strnattr(&dbc->ds->server8, (SQLCHAR*)writer_host.c_str(), writer_host.size());

std::string suffix = ".proxied";
if (writer_host.compare(writer_host.length() - suffix.length(), suffix.length(), suffix) == 0) {
MYLOG_TRACE(init_log_file().get(), 0, "[FAILOVER_HANDLER] Updating port to 8666");
dbc->ds->port = 8666;
}

MYLOG_TRACE(init_log_file().get(), 0, "[FAILOVER_HANDLER] returning true");
return true;
}
Expand Down

0 comments on commit 9e6e73c

Please sign in to comment.