mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
Add comments to case branches, explaining code meanings
This commit is contained in:
parent
3eb73751f5
commit
9389527609
@ -83,11 +83,11 @@ Connection.prototype.connect = function (port, host) {
|
||||
this.stream.once('data', function (buffer) {
|
||||
var responseCode = buffer.toString('utf8')
|
||||
switch (responseCode) {
|
||||
case 'N':
|
||||
case 'N': // Server does not support SSL connections
|
||||
return self.emit('error', new Error('The server does not support SSL connections'))
|
||||
case 'S':
|
||||
case 'S': // Server supports SSL connections, continue with a secure connection
|
||||
break
|
||||
default:
|
||||
default: // Any other response byte, including 'E' (ErrorResponse) indicating a server error
|
||||
return self.emit('error', new Error('There was an error establishing an SSL connection'))
|
||||
}
|
||||
var tls = require('tls')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user