diff --git a/testbot/main.go b/testbot/main.go index 7dbf7f2..93529bc 100644 --- a/testbot/main.go +++ b/testbot/main.go @@ -54,7 +54,7 @@ func main() { } log.Println("Begining main phase") cancelChan := make(chan bool) - for i := 0; i < 1; i++ { + for i := 0; i < 4; i++ { go func() { wg.Add(1) tb.MessageHandler(cancelChan) diff --git a/testbot/messages.go b/testbot/messages.go index dbcee1e..7d4c74d 100644 --- a/testbot/messages.go +++ b/testbot/messages.go @@ -20,6 +20,7 @@ func (t *TestBot) HandleMessage(e *mautrix.Event) { if e.Sender == t.Conf.Userid { return //we don't care about our own messages } + log.Printf("Handling message:'%v'\n", e.Content.Body) body := e.Content.Body body_s := strings.Split(body, " ") diff --git a/testbot/testbot.go b/testbot/testbot.go index bddd878..0b6cdc4 100644 --- a/testbot/testbot.go +++ b/testbot/testbot.go @@ -19,7 +19,6 @@ type TestBot struct { func (t *TestBot) Shutdown() { log.Printf("%v is shutting down", t.Conf.Name) t.Bot.Client.StopSync() - close(t.Jobs) t.DumpState() os.Exit(0) }