diff --git a/pkgs/http2/CHANGELOG.md b/pkgs/http2/CHANGELOG.md index 652fc543ee..eb28862663 100644 --- a/pkgs/http2/CHANGELOG.md +++ b/pkgs/http2/CHANGELOG.md @@ -1,6 +1,7 @@ -## 3.0.0-wip +## 3.0.0 - Require Dart SDK `3.7.0`. +- Add support for providing custom message when terminating a connection. ## 2.3.1 diff --git a/pkgs/http2/lib/src/connection.dart b/pkgs/http2/lib/src/connection.dart index 84cd8087e6..6a9f3fc9de 100644 --- a/pkgs/http2/lib/src/connection.dart +++ b/pkgs/http2/lib/src/connection.dart @@ -319,8 +319,8 @@ abstract class Connection { } /// Terminates this connection forcefully. - Future terminate([int? errorCode]) { - return _terminate(errorCode ?? ErrorCode.NO_ERROR); + Future terminate([int? errorCode, String? message]) { + return _terminate(errorCode ?? ErrorCode.NO_ERROR, message: message); } void _activeStateHandler(bool isActive) => diff --git a/pkgs/http2/lib/transport.dart b/pkgs/http2/lib/transport.dart index 2478763c34..4584e71bc6 100644 --- a/pkgs/http2/lib/transport.dart +++ b/pkgs/http2/lib/transport.dart @@ -74,7 +74,7 @@ abstract class TransportConnection { Future finish(); /// Terminates this connection forcefully. - Future terminate([int? errorCode]); + Future terminate([int? errorCode, String? message]); } abstract class ClientTransportConnection extends TransportConnection { diff --git a/pkgs/http2/pubspec.yaml b/pkgs/http2/pubspec.yaml index a39ecac51f..64ac728daa 100644 --- a/pkgs/http2/pubspec.yaml +++ b/pkgs/http2/pubspec.yaml @@ -1,5 +1,5 @@ name: http2 -version: 3.0.0-wip +version: 3.0.0 description: A HTTP/2 implementation in Dart. repository: https://github.com/dart-lang/http/tree/master/pkgs/http2