WebAudio/web-midi-api

MIDIPort close() does not cover the "pending" case

jazz-soft opened this issue · 2 comments

The function should probably cancel the pending requests from previously called open()

Spec should be updated to mandate this.

I think this is in step 5. of https://webaudio.github.io/web-midi-api/#dfn-algorithm-to-close-a-midiport

Is it as simple as changing this:
"If the output port's .state is not "connected", clear all pending send data and skip to the next step."

to this?
"If the output port's .state is not "connected", or if its .connection is "pending", clear all pending send data and skip to the next step."