close method Null safety

Future<void> close()

Before execution finished the websocket needs to be closed

Implementation

Future<void> close() async {
  await channel.sink.close(status.goingAway);
}