close method

Future<void> close()

关闭连接

Implementation

Future<void> close() async {
  _reconnectAttempts = maxReconnectAttempts; // 防止自动重连
  _cleanUp();
  _delegate?.onClose?.call();
}