             else if socket?
                 @_sockets[opts.session_uuid] = socket
                 socket.history = undefined
-            opts.cb(err, socket)
+                opts.cb(false, socket)
         )
 
     # Connect the client with a console session, possibly creating a session in the process.

    opts = defaults opts,
        port         : required
        secret_token : required
        cb           : required

    socket = misc_node.connect_to_locked_socket
        port  : opts.port
        token : opts.secret_token
        cb    : (err) =>
            if err
                opts.cb(err)

        @id = "#{@address} -p#{@port}"  # string that uniquely identifies this local hub -- useful for other code, e.g., sessions
        @_sockets = {}
        @_multi_response = {}
        @local_hub_socket  (err) =>
            if err
                @restart (err) =>
                    if err
                        cb("Unable to start and connect to local hub #{@address} -- #{err}")
                    else
                        @local_hub_socket (err) =>
                            cb(err, @)
            else
                cb(false, @)

