mirror of https://github.com/grpc/grpc-dart.git
Remove check for SecurityContext.alpnSupported in security#createSecurityContext (#353)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
parent
17a40219ba
commit
afacaa30e0
|
|
@ -17,10 +17,5 @@ import 'dart:io';
|
||||||
|
|
||||||
const supportedAlpnProtocols = ['grpc-exp', 'h2'];
|
const supportedAlpnProtocols = ['grpc-exp', 'h2'];
|
||||||
|
|
||||||
// TODO: Simplify once we have a stable Dart 1.25 release (update pubspec to
|
|
||||||
// require SDK >=1.25.0, and remove check for alpnSupported).
|
|
||||||
SecurityContext createSecurityContext(bool isServer) =>
|
SecurityContext createSecurityContext(bool isServer) =>
|
||||||
SecurityContext.alpnSupported
|
SecurityContext()..setAlpnProtocols(supportedAlpnProtocols, isServer);
|
||||||
? (SecurityContext()
|
|
||||||
..setAlpnProtocols(supportedAlpnProtocols, isServer))
|
|
||||||
: SecurityContext();
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue