ingore unix sockets on windows
This commit is contained in:
parent
77d29ed78b
commit
0b70ac0f66
1 changed files with 2 additions and 0 deletions
|
@ -2861,10 +2861,12 @@ int main(int argc, char ** argv) {
|
||||||
svr->set_read_timeout (sparams.read_timeout);
|
svr->set_read_timeout (sparams.read_timeout);
|
||||||
svr->set_write_timeout(sparams.write_timeout);
|
svr->set_write_timeout(sparams.write_timeout);
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
if (sparams.hostname.substr(0, 7) == "unix://") {
|
if (sparams.hostname.substr(0, 7) == "unix://") {
|
||||||
svr->set_address_family(AF_UNIX);
|
svr->set_address_family(AF_UNIX);
|
||||||
sparams.hostname = sparams.hostname.substr(7);
|
sparams.hostname = sparams.hostname.substr(7);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!svr->bind_to_port(sparams.hostname, sparams.port)) {
|
if (!svr->bind_to_port(sparams.hostname, sparams.port)) {
|
||||||
fprintf(stderr, "\ncouldn't bind to server socket: hostname=%s port=%d\n\n", sparams.hostname.c_str(), sparams.port);
|
fprintf(stderr, "\ncouldn't bind to server socket: hostname=%s port=%d\n\n", sparams.hostname.c_str(), sparams.port);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue