mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-05 20:41:44 -07:00
fix cv2 connection
This commit is contained in:
parent
db06c98608
commit
af3f8b00a4
2 changed files with 9 additions and 8 deletions
|
@ -47,15 +47,11 @@ CV2::CV2(const Identity &myId, const char *path, int listenPort)
|
|||
, _waitNoticePrinted(false)
|
||||
, _listenPort(listenPort)
|
||||
{
|
||||
fprintf(stderr, "CV2::CV2\n");
|
||||
char myAddress[64];
|
||||
_myAddressStr = myId.address().toString(myAddress);
|
||||
|
||||
// replace cv2: with postgres: for the path/connstring
|
||||
std::string _path(path);
|
||||
if (_path.length() > 4 && _path.substr(0, 4) == "cv2:") {
|
||||
_path = "postgres:" + _path.substr(4);
|
||||
}
|
||||
_connString = std::string(_path);
|
||||
_connString = std::string(path);
|
||||
|
||||
auto f = std::make_shared<PostgresConnFactory>(_connString);
|
||||
_pool = std::make_shared<ConnectionPool<PostgresConnection> >(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue