Using nxt_lvlhsh_peek() and nxt_lvlhsh_retrieve().

This commit is contained in:
Igor Sysoev
2018-03-29 16:35:36 +03:00
parent aad7752527
commit 7205bf4b86
3 changed files with 6 additions and 41 deletions

View File

@@ -467,16 +467,11 @@ static nxt_buf_t nxt_port_close_dummy_buf;
void
nxt_port_rpc_close(nxt_task_t *task, nxt_port_t *port)
{
nxt_lvlhsh_each_t lhe;
nxt_port_rpc_reg_t *reg;
nxt_port_recv_msg_t msg;
for ( ;; ) {
nxt_memzero(&lhe, sizeof(nxt_lvlhsh_each_t));
lhe.proto = &lvlhsh_rpc_reg_proto;
reg = nxt_lvlhsh_each(&port->rpc_streams, &lhe);
reg = nxt_lvlhsh_peek(&port->rpc_streams, &lvlhsh_rpc_reg_proto);
if (reg == NULL) {
return;
}