diff options
author | 2015-06-26 16:16:12 -0700 | |
---|---|---|
committer | 2015-06-26 16:16:12 -0700 | |
commit | 4b804104b67c1c10b358877ed5090df62c422fc1 (patch) | |
tree | 04283ed77585d1d99b7ad6b49ae3ef7070d80b8f /src/core/surface/server.c | |
parent | 5f84c8478ab61c30cc98d956bbe327e02142d2e6 (diff) |
Small fixes
Diffstat (limited to 'src/core/surface/server.c')
-rw-r--r-- | src/core/surface/server.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/surface/server.c b/src/core/surface/server.c index 98e0e81eaa..f4d76e882f 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -916,14 +916,6 @@ void grpc_server_setup_transport(grpc_server *s, grpc_transport *transport, server_ref(s); chand->channel = channel; - GRPC_CHANNEL_INTERNAL_REF(channel, "connectivity"); - memset(&op, 0, sizeof(op)); - op.set_accept_stream = accept_stream; - op.set_accept_stream_user_data = chand; - op.on_connectivity_state_change = &chand->channel_connectivity_changed; - op.connectivity_state = &chand->connectivity_state; - grpc_transport_perform_op(transport, &op); - num_registered_methods = 0; for (rm = s->registered_methods; rm; rm = rm->next) { num_registered_methods++; @@ -963,6 +955,14 @@ void grpc_server_setup_transport(grpc_server *s, grpc_transport *transport, gpr_mu_unlock(&s->mu_global); gpr_free(filters); + + GRPC_CHANNEL_INTERNAL_REF(channel, "connectivity"); + memset(&op, 0, sizeof(op)); + op.set_accept_stream = accept_stream; + op.set_accept_stream_user_data = chand; + op.on_connectivity_state_change = &chand->channel_connectivity_changed; + op.connectivity_state = &chand->connectivity_state; + grpc_transport_perform_op(transport, &op); } void grpc_server_shutdown_and_notify(grpc_server *server, |