don't close jobs queue, let GC handle it

This commit is contained in:
stryan 2020-04-11 17:24:47 -04:00
parent ba59914156
commit da39ba7b18
3 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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, " ")

View File

@ -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)
}