Introduce workaround for IPv6 DNS resolution until nodejs becomes RFC 3484 compliant

Change-Type: patch
This commit is contained in:
Petros Angelatos 2018-02-22 21:33:49 -08:00 committed by Pablo Carranza Velez
parent 2f0fcff8ef
commit cda561f997

View File

@ -1,3 +1,14 @@
do ->
# Make NodeJS RFC 3484 compliant for properly handling IPv6
# See: https://github.com/nodejs/node/pull/14731
# https://github.com/nodejs/node/pull/17793
dns = require('dns')
{ lookup } = dns
dns.lookup = (name, opts, cb) ->
if typeof cb isnt 'function'
return lookup(name, { verbatim: true }, opts)
return lookup(name, Object.assign({ verbatim: true }, opts), cb)
require('log-timestamp')
Supervisor = require './supervisor'