Remove check for SecurityContext.alpnSupported in security#createSecurityContext (#353)

Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
Wayne Li 2020-09-18 01:29:09 -07:00 committed by GitHub
parent 17a40219ba
commit afacaa30e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -17,10 +17,5 @@ import 'dart:io';
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.alpnSupported
? (SecurityContext()
..setAlpnProtocols(supportedAlpnProtocols, isServer))
: SecurityContext();
SecurityContext()..setAlpnProtocols(supportedAlpnProtocols, isServer);