diff options
author | 2015-02-05 21:41:23 -0800 | |
---|---|---|
committer | 2015-02-05 21:41:23 -0800 | |
commit | 8b976d0c244e516c2195c699bf396cf1dac2baa5 (patch) | |
tree | f6e3a69f2fb200cb3d036844cf691eebbd7eb36f /src/core/surface/server.c | |
parent | c230a7451dbfc0627bdd3173118a91b075856619 (diff) |
Fixes
Diffstat (limited to 'src/core/surface/server.c')
-rw-r--r-- | src/core/surface/server.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/surface/server.c b/src/core/surface/server.c index c0c524ad8d..ee0f96a580 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -346,6 +346,7 @@ static void call_op(grpc_call_element *elem, grpc_call_element *from_elemn, static void channel_op(grpc_channel_element *elem, grpc_channel_element *from_elem, grpc_channel_op *op) { channel_data *chand = elem->channel_data; + grpc_server *server = chand->server; switch (op->type) { case GRPC_ACCEPT_CALL: @@ -356,11 +357,11 @@ static void channel_op(grpc_channel_element *elem, case GRPC_TRANSPORT_CLOSED: /* if the transport is closed for a server channel, we destroy the channel */ - gpr_mu_lock(&chand->server->mu); - server_ref(chand->server); + gpr_mu_lock(&server->mu); + server_ref(server); destroy_channel(chand); - gpr_mu_unlock(&chand->server->mu); - server_unref(chand->server); + gpr_mu_unlock(&server->mu); + server_unref(server); break; case GRPC_TRANSPORT_GOAWAY: gpr_slice_unref(op->data.goaway.message); |