Skip to content

Commit 2b34480

Browse files
committed
merge of #6102 allowing null in 'ot' of yaml tests
review: CR 3755 branch: larkost/6102-allow-null-in-yaml-output
1 parent de5ef38 commit 2b34480

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

net.coffee

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ aropt = util.aropt
9494
mkAtom = util.mkAtom
9595
mkErr = util.mkErr
9696

97+
# These are the default hostname and port used by RethinkDB
98+
DEFAULT_HOST = 'localhost'
99+
DEFAULT_PORT = 28015
100+
101+
module.exports.DEFAULT_HOST = DEFAULT_HOST
102+
module.exports.DEFAULT_PORT = DEFAULT_PORT
103+
97104
# These are strings returned by the server after a handshake
98105
# request. Since they must match exactly they're defined in
99106
# "constants" here at the top
@@ -121,10 +128,7 @@ HANDSHAKE_AUTHFAIL = "ERROR: Incorrect authorization key.\n"
121128
# - `"timeout"` will be emitted by the `TcpConnection` subclass if the
122129
# underlying socket times out for any reason.
123130
class Connection extends events.EventEmitter
124-
125-
# These are the default hostname and port used by RethinkDB
126-
DEFAULT_HOST: 'localhost'
127-
DEFAULT_PORT: 28015
131+
128132
# By default, RethinkDB doesn't use an authorization key.
129133
DEFAULT_AUTH_KEY: ''
130134
# Each connection has a timeout (in seconds) for the initial handshake with the
@@ -145,8 +149,8 @@ class Connection extends events.EventEmitter
145149
host = {host: host}
146150

147151
# Here we set all of the connection parameters to their defaults.
148-
@host = host.host || @DEFAULT_HOST
149-
@port = host.port || @DEFAULT_PORT
152+
@host = host.host || DEFAULT_HOST
153+
@port = host.port || DEFAULT_PORT
150154

151155
# One notable exception to defaulting is the db name. If the
152156
# user doesn't specify it, we leave it undefined. On the

0 commit comments

Comments
 (0)