isRelayRegisteredAndConnectedSuccesfully method

bool isRelayRegisteredAndConnectedSuccesfully(
  1. String relay
)

Implementation

bool isRelayRegisteredAndConnectedSuccesfully(String relay) {
  final relayWebSocket = relaysWebSocketsRegistry[relay];

  if (relayWebSocket == null) {
    return false;
  }

  if (relayWebSocket.closeCode == null) {
    return true;
  } else {
    return false;
  }
}