mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
新增url判空逻辑
This commit is contained in:
parent
4f05aef245
commit
ea6ef2779e
@ -212,6 +212,7 @@ static void inline checkHost(std::string &host) {
|
||||
}
|
||||
|
||||
void splitUrl(const std::string &url, std::string &host, uint16_t &port) {
|
||||
CHECK(!url.empty(), "empty url");
|
||||
auto pos = url.rfind(':');
|
||||
if (pos == string::npos || url.back() == ']') {
|
||||
//没有冒号,未指定端口;或者是纯粹的ipv6地址
|
||||
|
Loading…
Reference in New Issue
Block a user