1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-11 13:03:14 +00:00

Fixed bug in Domain Socket detection logic on linux

This commit is contained in:
Bryan Roe
2019-02-26 15:59:38 -08:00
parent 623983b3d4
commit 2633fc2928

View File

@@ -276,12 +276,13 @@ duk_ret_t ILibDuktape_net_socket_connect(duk_context *ctx)
ILibDuktape_EventEmitter_AddOn(ptrs->emitter, "connect", duk_require_heapptr(ctx, 1));
}
}
if (duk_is_string(ctx, 0) || pathLen > 0)
if (duk_is_string(ctx, 0) || (pathLen > 0 && port == 0))
{
// This is a PATH string (Domain Socket)
#ifndef _POSIX
//return(ILibDuktape_Error(ctx, "AF_UNIX sockets not supported on this platform"));
#else
if (pathLen > 0)
{
host = path;