+63
−64
+10
−8
+1
−7
+6
−2
Loading
This refactoring cleans up some dead code, and makes some semantic changes to how the MessageChannel lifecycle is handled. These changes ensure that messages which were sent by a peer before the GOODBYE message will be delivered, without allowing messages sent after the GOODBYE message (e.g. by a misbehaving process) to be delivered. The lifecycle and shutdown states were simplified, and moved to be entirely in MessageChannel, rather than split between MessageChannel and MessageLink. The dead-code ChannelTimeout error state was removed, along with the corresponding CloseWithTimeout method. The CloseWithError method was updated to behave more consistently with the normal Close method, synchronously triggering a connection error, and closing the MessageLink. This method is currently unused, but will useful in the future for handling processing errors. Differential Revision: https://phabricator.services.mozilla.com/D178382