diff --git a/microscript/ILibDuktape_net.c b/microscript/ILibDuktape_net.c index 6eea4bd..4e6f90c 100644 --- a/microscript/ILibDuktape_net.c +++ b/microscript/ILibDuktape_net.c @@ -456,12 +456,13 @@ duk_ret_t ILibDuktape_net_socket_connect(duk_context *ctx) if (duk_has_prop_string(ctx, -1, "_sharedDB")) { ILibSimpleDataStore db = (ILibSimpleDataStore)Duktape_GetPointerProperty(ctx, -1, "_sharedDB"); - char *dnsCache = (char*)duk_push_sprintf(ctx, "DNS[%s]", host); + char *dnsCache = (char*)duk_push_sprintf(ctx, "DNS[%s]", host); // [dnsCache] char dnsCacheBuffer[255]; if (ILibSimpleDataStore_Get(db, dnsCache, dnsCacheBuffer, sizeof(dnsCacheBuffer)) > 0) { ILibResolveEx(dnsCacheBuffer, (unsigned short)port, &dest); } + duk_pop(ctx); // ... } } if (dest.sin6_family == AF_UNSPEC || (duk_is_object(ctx, 0) && duk_has_prop_string(ctx, 0, "proxy") && proxy.sin6_family == AF_UNSPEC))