mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
enable IPv6 support when using native bindings
This commit is contained in:
parent
a029e6512b
commit
4b88c82b16
@ -77,7 +77,7 @@ var getLibpgConString = function(config, callback) {
|
||||
if(config.host) {
|
||||
if(config.host != 'localhost' && config.host != '127.0.0.1') {
|
||||
//do dns lookup
|
||||
return require('dns').lookup(config.host, 4, function(err, address) {
|
||||
return require('dns').lookup(config.host, function(err, address) {
|
||||
if(err) return callback(err, null);
|
||||
params.push("hostaddr="+address)
|
||||
callback(null, params.join(" "))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user