Skip to content

Commit c6182a2

Browse files
fix: http.get returns "getaddrinfo ENOTFOUND" error (#42)
1 parent d0e0bd3 commit c6182a2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ipscan.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const ipscan =
3434
flatMap(urls => forkJoin(
3535
urls.map(url => http.post(url, {
3636
headers: { 'Content-Type': 'application/soap+xml; charset=utf-8;' },
37+
family: 4, // https://github.com/nodejs/node/issues/5436#issuecomment-189600282
3738
body: '<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope"><Body xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetSystemDateAndTime xmlns="http://www.onvif.org/ver10/device/wsdl"/></Body></Envelope>'
3839
}).pipe(
3940
map(res => res.response.statusCode === 200

0 commit comments

Comments
 (0)