Node.js Faye取消订阅不会触发服务器上的任何内容

Node.js Faye取消订阅不会触发服务器上的任何内容,node.js,faye,Node.js,Faye,我在node.js中运行了一个非常简单的Faye服务器,如下所示: faye.on('subscribe', function(message, channel) { console.log('subscribed', channel); } faye.on('unsubscribe', function(message, channel) { console.log('unsubscribed',channel); } 在我的客户中,我正在执行以下操作: f = new Fa

我在node.js中运行了一个非常简单的Faye服务器,如下所示:

faye.on('subscribe', function(message, channel) {
    console.log('subscribed', channel);
}
faye.on('unsubscribe', function(message, channel) {
    console.log('unsubscribed',channel);
}
在我的客户中,我正在执行以下操作:

f = new Faye.Client(url);
var s = f.subscribe('/test'); // The server hits the subscribe event
s.cancel();  // Nothing happens on the server
f.unsubscribe('/test');  // Nothing happens here either
我的理解是,执行这些取消订阅方法中的任何一种都会触发发送到/meta/unsubscribe的消息,服务器应该会看到“unsubscribe”事件,但这里的情况似乎不是这样。我甚至尝试在服务器上添加一个传入的扩展,但我从未看到任何传入的where message.channel=='/meta/unsubscribe'


有人能解释一下为什么我没有看到不明嫌犯事件的发生吗?

下面是一个正在运行的faye服务器示例(请注意bayeux):

'use strict'

var server = function(port, pathOptional){
    var http = require('http'),
        faye = require('faye');

    var server = http.createServer();
    var path = '';
    if (pathOptional){
        path += pathOptional;
    }
    var bayeux = new faye.NodeAdapter({mount: '/'+path});

    bayeux.on('subscribe', function(message, channel) {
        console.log('subscribed', channel, message);
    });
    bayeux.on('unsubscribe', function(message, channel) {
        console.log('unsubscribed',channel);
    });
    bayeux.attach(server);
    server.listen(port);
    console.log('server listening on port '+port.toString() );

}


server(8002);