aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ext/transport')
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create.c4
-rw-r--r--src/core/ext/transport/chttp2/client/secure/secure_channel_create.c4
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c20
-rw-r--r--src/core/ext/transport/chttp2/transport/parsing.c6
4 files changed, 19 insertions, 15 deletions
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c
index ee2ac44978..5484438f0a 100644
--- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c
+++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c
@@ -41,12 +41,12 @@
#include <grpc/support/slice_buffer.h>
#include "src/core/ext/census/grpc_filter.h"
+#include "src/core/ext/client_config/client_channel.h"
+#include "src/core/ext/client_config/resolver_registry.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/client_channel.h"
#include "src/core/lib/channel/compress_filter.h"
#include "src/core/lib/channel/http_client_filter.h"
-#include "src/core/lib/client_config/resolver_registry.h"
#include "src/core/lib/iomgr/tcp_client.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
index 5d30805639..58af6f995a 100644
--- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
+++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
@@ -40,10 +40,10 @@
#include <grpc/support/slice.h>
#include <grpc/support/slice_buffer.h>
+#include "src/core/ext/client_config/client_channel.h"
+#include "src/core/ext/client_config/resolver_registry.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/client_channel.h"
-#include "src/core/lib/client_config/resolver_registry.h"
#include "src/core/lib/iomgr/tcp_client.h"
#include "src/core/lib/security/auth_filters.h"
#include "src/core/lib/security/credentials.h"
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index 62f0c53e0d..b4cd185e62 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -1147,16 +1147,18 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport_global *transport_global,
grpc_chttp2_stream_global *stream_global,
grpc_status_code status) {
- if (stream_global->id != 0) {
- gpr_slice_buffer_add(
- &transport_global->qbuf,
- grpc_chttp2_rst_stream_create(
- stream_global->id,
- (uint32_t)grpc_chttp2_grpc_status_to_http2_error(status),
- &stream_global->stats.outgoing));
+ if (!stream_global->read_closed || !stream_global->write_closed) {
+ if (stream_global->id != 0) {
+ gpr_slice_buffer_add(
+ &transport_global->qbuf,
+ grpc_chttp2_rst_stream_create(
+ stream_global->id,
+ (uint32_t)grpc_chttp2_grpc_status_to_http2_error(status),
+ &stream_global->stats.outgoing));
+ }
+ grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status,
+ NULL);
}
- grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status,
- NULL);
grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1,
1);
}
diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c
index c754c6005e..e827a43f7a 100644
--- a/src/core/ext/transport/chttp2/transport/parsing.c
+++ b/src/core/ext/transport/chttp2/transport/parsing.c
@@ -112,7 +112,7 @@ void grpc_chttp2_publish_reads(
GOAWAY last-grpc_chttp2_stream-id=0 in this case. */
if (!transport_parsing->is_client) {
transport_global->last_incoming_stream_id =
- transport_parsing->incoming_stream_id;
+ transport_parsing->last_incoming_stream_id;
}
/* update global settings */
@@ -371,7 +371,9 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx,
if (!init_frame_parser(exec_ctx, transport_parsing)) {
return 0;
}
- if (transport_parsing->incoming_stream_id) {
+ if (transport_parsing->incoming_stream_id != 0 &&
+ transport_parsing->incoming_stream_id >
+ transport_parsing->last_incoming_stream_id) {
transport_parsing->last_incoming_stream_id =
transport_parsing->incoming_stream_id;
}