brianc/node-postgres — Issue #74: early timeout on LISTEN query
Author: Lheurt
Created: 2011-11-25 09:58:05+00:00
State: open

I properly receive "notification" events when I issue a LISTEN query, but the connection seems to timeout rather fast (about 15 seconds in). I can't seem to find anyway to prevent the timeout or catch it when it happens. Any existing solution to this ?

pg.connect(pgConnectionString, function(err, client) {
client.query('LISTEN "watcher"');
client.on('notification', function(data) {
console.log(data.payload);
});
});