Skip to content
Snippets Groups Projects
Commit 87e8b6df authored by Yang Gao's avatar Yang Gao
Browse files

Merge pull request #651 from ctiller/interop

Fix server side large message receiving
parents 1b2f9020 d9e6413f
No related branches found
No related tags found
No related merge requests found
...@@ -360,8 +360,7 @@ static void unlock(grpc_call *call) { ...@@ -360,8 +360,7 @@ static void unlock(grpc_call *call) {
int num_completed_requests = call->num_completed_requests; int num_completed_requests = call->num_completed_requests;
int need_more_data = int need_more_data =
call->need_more_data && call->need_more_data &&
!call->sending && (call->write_state >= WRITE_STATE_STARTED || !call->is_client);
call->write_state >= WRITE_STATE_STARTED;
int i; int i;
if (need_more_data) { if (need_more_data) {
...@@ -536,14 +535,16 @@ static void finish_finish_step(void *pc, grpc_op_error error) { ...@@ -536,14 +535,16 @@ static void finish_finish_step(void *pc, grpc_op_error error) {
} }
static void finish_start_step(void *pc, grpc_op_error error) { static void finish_start_step(void *pc, grpc_op_error error) {
finish_send_op(pc, GRPC_IOREQ_SEND_INITIAL_METADATA, WRITE_STATE_STARTED, error); finish_send_op(pc, GRPC_IOREQ_SEND_INITIAL_METADATA, WRITE_STATE_STARTED,
error);
} }
static send_action choose_send_action(grpc_call *call) { static send_action choose_send_action(grpc_call *call) {
switch (call->write_state) { switch (call->write_state) {
case WRITE_STATE_INITIAL: case WRITE_STATE_INITIAL:
if (is_op_live(call, GRPC_IOREQ_SEND_INITIAL_METADATA)) { if (is_op_live(call, GRPC_IOREQ_SEND_INITIAL_METADATA)) {
if (is_op_live(call, GRPC_IOREQ_SEND_MESSAGE) || is_op_live(call, GRPC_IOREQ_SEND_CLOSE)) { if (is_op_live(call, GRPC_IOREQ_SEND_MESSAGE) ||
is_op_live(call, GRPC_IOREQ_SEND_CLOSE)) {
return SEND_BUFFERED_INITIAL_METADATA; return SEND_BUFFERED_INITIAL_METADATA;
} else { } else {
return SEND_INITIAL_METADATA; return SEND_INITIAL_METADATA;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment