mirror of
https://github.com/joyieldInc/predixy.git
synced 2025-12-24 22:46:41 +08:00
commit
0635178c2e
@ -102,7 +102,7 @@ void Socket::getFirstAddr(const char* addr, int type, int protocol, sockaddr* re
|
||||
} else {
|
||||
std::string tmp;
|
||||
const char* host = addr;
|
||||
const char* port = strchr(addr, ':');
|
||||
const char* port = strrchr(addr, ':');
|
||||
if (port) {
|
||||
tmp.append(addr, port - addr);
|
||||
host = tmp.c_str();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user