Skip to content

Commit

Permalink
Proper NPE fix (#436)
Browse files Browse the repository at this point in the history
Co-authored-by: Vyacheslav Egorov <[email protected]>
  • Loading branch information
ankur2136 and mraleph authored Jan 28, 2021
1 parent 2584a5e commit 17c0d37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/client/http2_connection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ class Http2ClientConnection implements connection.ClientConnection {
metadata,
compressionCodec,
userAgent: options.userAgent,
grpcAcceptEncodings: callOptions?.metadata['grpc-accept-encoding'] ??
options.codecRegistry?.supportedEncodings,
grpcAcceptEncodings:
(callOptions?.metadata ?? const {})['grpc-accept-encoding'] ??
options.codecRegistry?.supportedEncodings,
);
final stream = _transportConnection.makeRequest(headers);
return Http2TransportStream(
Expand Down

0 comments on commit 17c0d37

Please sign in to comment.