JKRhb / dtls2

A DTLS library for Dart based on OpenSSL.
MIT License
3 stars 0 forks source link

Unhandled Exception: DtlsException: DTLS Handshake has failed. #77

Closed Ifilehk closed 1 year ago

Ifilehk commented 1 year ago

Bom dia again :-)

Not able to catch DtlsException: DTLS Handshake exception. Here the piece of code in dtls_client.dart

 void _performShutdown(Exception exception) {
    final wasInHandshake = inHandshake;
    close();

    if (wasInHandshake) {
      _connectCompleter.completeError(exception);
    } else {
      throw exception;
    }
  }

In fact wasInHandshake in false but event in this situation it should completeError the exception to be able to catch it upwards

JKRhb commented 1 year ago

Hi! ;) Could you check in which state the connection is when the exception is thrown?

Ifilehk commented 1 year ago

the state is ConnectionState.closed

JKRhb commented 1 year ago

Speaking of issues: Do you think this one is still relevant? Or has it been resolved by #75?

Ifilehk commented 1 year ago

Hem don't really remember the case when it happened.

For now and with the intensive use of your work, did not see anything pointing to that. So hopefully closed by #75

If something pointing to that will appears in future, I will reopen it. But for now could be closed.

JKRhb commented 1 year ago

Great, thank you for your feedback :)