close method
You override this method to release any resources created in prepare.
This method is invoked when the owning Application is stopped. It closes open ports that this channel was using so that the application can be properly shut down.
Prefer to use ServiceRegistry
instead of overriding this method.
If you do override this method, you must call the super implementation.
Implementation
@mustCallSuper
Future close() async {
logger.fine(
"ApplicationChannel(${server.identifier}).close: closing messageHub",
);
await messageHub.close();
}