Skip to content

messages stay in bus #4

Description

@coderofsalvation

for some reason the messages stay in the bus :/
Every time you run this, console.dir() will output more.

var simplebus = require('./.');
var bus = simplebus.createBus(1);
var server = simplebus.createServer(bus, 3001);
server.start()
var simplebus = require('simplebus');                                                                                                                                                             

var bus = simplebus.createClient(3001);                                                                                                                                                           

bus.start( function(){                                                                                                                                                                            

  console.log("connected to bus")                                                                                                                                                                 

  bus.subscribe({event:"myevent"}, function(data) {                                                                                                                                               
    console.dir(data);                                                                                                                                                                            
  });                                                                                                                                                                                             

  bus.post({ event: "myevent", data:{} });                                                                                                                                                        

}) 

UPDATE: here's the problem: #5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions