Closes this instance.
Tell the sink that no further requests will be added, and it may release any resources it is using. Prefer using ServiceRegistry to overriding this method.
If you do override this method, you must call the super implementation. The default behavior of this method removes any listeners from logger, so it is advantageous to invoke the super implementation at the end of the override.
Source
Future close() async { logger.fine("RequestSink(${server.identifier}).close: closing messageHub"); await messageHub.close(); logger.fine("RequestSink(${server.identifier}).close: clear logger listeners"); logger?.clearListeners(); }