-
Notifications
You must be signed in to change notification settings - Fork 46
Conversation
2d47391
to
b4a1059
Compare
b4a1059
to
85c49cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks very reasonable. I have some suggestions, but see no obvious problems.
experimental/server.dart
Outdated
@@ -47,7 +47,7 @@ void handleClient(SecureSocket socket) { | |||
connection.incomingStreams.listen((ServerTransportStream stream) async { | |||
dumpInfo('main', 'Got new HTTP/2 stream with id: ${stream.id}'); | |||
|
|||
String path; | |||
String? path; | |||
stream.incomingMessages.listen((StreamMessage msg) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Consider using forEach
instead of listen
when you don't use the subscription (unless you expect the stream to contain errors, which it doesn't seem like).
lib/src/connection_preface.dart
Outdated
@@ -42,13 +42,13 @@ const List<int> CONNECTION_PREFACE = [ | |||
/// connection preface. If an error occurs while reading the connection | |||
/// preface, the returned stream will have only an error. | |||
Stream<List<int>> readConnectionPreface(Stream<List<int>> incoming) { | |||
StreamController<List<int>> result; | |||
StreamSubscription subscription; | |||
late StreamController<List<int>> result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd initialize result = StreamController();
and just set onListen
etc. later. Then there is no need for late
.
Thanks Lasse! That is very helpful |
Analysis exclusions are not needed for these files anymore
No description provided.