diff --git a/lib/rcon.js b/lib/rcon.js index 081ec80..54a5326 100644 --- a/lib/rcon.js +++ b/lib/rcon.js @@ -74,7 +74,11 @@ var Rcon = function(options) { this.host = options.host || '127.0.0.1'; this.port = options.port || '27015'; this.password = options.password; - this.timeout = options.timeout || 5000; + + if (typeof options.timeout == 'number') + this.timeout = options.timeout; + else + this.timeout = 5000; //