             return
         }
         self.sendMessage(AbortSwampMessage(details: [:], reason: "wamp.error.system_shutdown"))
+        self.transport.disconnect("No challenge delegate found.")
     }
     
     private func sendMessage(message: SwampMessage){
-        if let data = self.serializer?.pack(message.marshall()) {
+        if let data = self.serializer?.pack(message.marshal()) {
             self.transport.sendData(data)
         }
     }

            // For now basic profile, (demands empty dicts)
            roles[role.rawValue] = [:]
        }
        var details = self.details
        details["agent"] = self.clientName
        details["roles"] = roles
        self.sendMessage(HelloSwampMessage(realm: self.realm, details: details))

    private var unsubscribeRequests: [Int: (subscription: Int, callback: UnsubscribeCallback, errorCallback: ErrorUnsubscribeCallback)] = [:]
    
    // MARK: C'tor
    required public init(realm: String, transport: SwampTransport, authmethods: [String]?=nil, authid: String?=nil, authrole: String?=nil, authextra: [String: AnyObject]?=nil){
        self.realm = realm
        self.transport = transport
        self.authmethods = authmethods
        self.authid = authid
        self.authrole = authrole
        self.authextra = authextra
        self.transport.delegate = self
    }
    
    // MARK: Public API
    
    final public func isConnected() -> Bool {
        return self.sessionId != nil
    }
    
    final public func connect() {
        self.transport.connect()
    }
    
    final public func disconnect(reason: String="wamp.error.close_realm") {
        self.sendMessage(GoodbyeSwampMessage(details: [:], reason: reason))
    }
    
    // MARK: Caller role
