diff --git a/broker/broker.go b/broker/broker.go index 47fb221..171e6e3 100644 --- a/broker/broker.go +++ b/broker/broker.go @@ -65,6 +65,8 @@ func (b *Broker) Start() { log.Error("broker is null") return } + StartDispatcher() + //listen clinet over tcp if b.config.Port != "" { go b.StartClientListening(false) diff --git a/main.go b/main.go index 9c04b2e..6579900 100644 --- a/main.go +++ b/main.go @@ -34,7 +34,6 @@ func main() { log.Error("Load Config file error: ", er) return } - broker.StartDispatcher() b, err := broker.NewBroker(config) if err != nil {