Skip to content

Commit

Permalink
refactor: use method cascade when openning WebSocket connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Amaro committed Aug 24, 2023
1 parent b620627 commit d97f706
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/protocol/network/web_socket_transport.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class WebSocketTransport implements Transport {
List<int> keyBytes = await _getKeyBytes();
List<int> certificateChainBytes = await _getCertificateChainBytes();

securityContext = SecurityContext(withTrustedRoots: true);
securityContext.usePrivateKeyBytes(keyBytes);
securityContext.useCertificateChainBytes(certificateChainBytes);
securityContext = SecurityContext(withTrustedRoots: true)
..usePrivateKeyBytes(keyBytes)
..useCertificateChainBytes(certificateChainBytes);
}

final customClient = HttpClient(
Expand Down

0 comments on commit d97f706

Please sign in to comment.