This middleware does not result in a named object once assigned to the `engine`, making it harder to identify & cleanup listeners when a connection is closed, as I had to somewhat hack here: https://github.com/MetaMask/metamask-extension/pull/6670/files