fix mislocated err check

This commit is contained in:
Joel Wetzell
2025-11-23 10:59:56 -06:00
parent 23d0441140
commit ca137db613

View File

@@ -76,6 +76,11 @@ func (mc *MIDIClient) Run() error {
mc.router.HandleInput(mc.Id(), msg)
}
}, midi.UseSysEx())
if err != nil {
return err
}
defer stop()
out, err := midi.FindOutPort(mc.OutputPort)
@@ -91,10 +96,6 @@ func (mc *MIDIClient) Run() error {
mc.SendFunc = send
if err != nil {
return err
}
<-mc.router.Context.Done()
slog.Debug("router context done in module", "id", mc.config.Id)
return nil