node.js - Check when Faye has finished the publish function -


i'm quite new working faye , have small question concerning it. i'm trying call redirect function page after publish string faye.

the problem is: redirect happens before faye has gotten chance make it's connections , send channel.

my question is: there way check when faye has succesfully published , execute function afterwards?

thanks!

there way check if publishing message has been successful or not:

var publication = client.publish('/foo', {text: 'hi there'});  publication.then(function() {   // ok }, function(error) {   // not ok, redirect }); 

this 1 documented.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -