+ struct btr_node *btrn = wn->btrn;
+ int ret;
+ char *buf;
+ size_t bytes;
+
+ t->error = 0;
+ ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_LEAF);
+ if (ret <= 0)
+ goto out;
+ if (!FD_ISSET(pfwd->fd, &s->wfds))
+ return;
+ bytes = btr_next_buffer(btrn, &buf);
+ assert(bytes > 0);
+ //PARA_INFO_LOG("writing %zu\n", bytes);
+ ret = write(pfwd->fd, buf, bytes);
+ if (ret < 0)
+ goto out;
+ btr_consume(btrn, ret);
+out:
+ if (ret < 0)
+ btr_remove_node(btrn);
+ t->error = ret;