不要怂,就是干,撸起袖子干!

Commit bed9ac6b by denysonique

throw err for pg.connect

1 parent 3f3a797b
Showing with 3 additions and 1 deletions
...@@ -55,7 +55,9 @@ module.exports = (function() { ...@@ -55,7 +55,9 @@ module.exports = (function() {
var connectCallback = function(err, client) { var connectCallback = function(err, client) {
self.isConnecting = false self.isConnecting = false
if (!err && client) { if (err) {
throw err
} else if (client) {
client.query("SET TIME ZONE 'UTC'") client.query("SET TIME ZONE 'UTC'")
.on('end', function() { .on('end', function() {
self.isConnected = true self.isConnected = true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!