serial: Wait for stream closure before finishing close
The SerialPort close() method internally calls this.readable.cancel() and this.writable.abort() to close its data streams before closing the port itself. When either of these streams is already erroring the Promises returned by these methods can be resolved before the underlying source or sink has actually finished closing the stream. This patch adds logic to wait until the streams are actually closed before continuing the close process. Bug: 1137563 Change-Id: Ic2c1fd10524292f5b33dfc8279804fe89b00ce7c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462711 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by:Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#820375}
Showing
Please register or sign in to comment