Skip to content

Commit

Permalink
feat: allow for overriding the initTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Oct 18, 2024
1 parent 3517a5b commit cde4353
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/binding_coap/coap_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ final class CoapClient extends ProtocolClient
form,
pskCredentialsCallback: _pskCredentialsCallback,
),
initTimeout: _coapConfig?.initTimeout ?? const Duration(seconds: 10),
);

final request = await _createRequest(
Expand Down
3 changes: 3 additions & 0 deletions lib/src/binding_coap/coap_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ class CoapConfig {
this.clientCertificate,
this.clientPrivateKey,
this.verifyPrivateKey = false,
this.initTimeout,
});

final Duration? initTimeout;

/// Whether certificates should be verified by OpenSSL.
final bool dtlsVerify;

Expand Down

0 comments on commit cde4353

Please sign in to comment.