             if not handshake_complete
                 @rawSocket.destroy()
                 @emit 'error', new RqlDriverError "Handshake timedout"
-        ), @timeout)
+        ), @timeout*1000)
 
 
     close: () ->

    DEFAULT_HOST: 'localhost'
    DEFAULT_PORT: 28015
    DEFAULT_AUTH_KEY: ''
    DEFAULT_TIMEOUT: 20

    constructor: (host, callback) ->
        if typeof host is 'undefined'

                        @buffer = bufferSlice(@buffer, i)
                        status_str = String.fromCharCode.apply(null, new Uint8Array status_buf)

                        handshake_complete = true
                        if status_str == "SUCCESS"
                            # We're good, finish setting up the connection
                            @rawSocket.on 'data', (buf) =>
                                @_data(toArrayBuffer(buf))

                            @emit 'connect'
                            return
                        else
