Browse Source

Add flow control for upstream (#316)

ithewei 3 years ago
parent
commit
a34000e9ef
1 changed files with 1 additions and 0 deletions
  1. 1 0
      event/hevent.c

+ 1 - 0
event/hevent.c

@@ -881,6 +881,7 @@ void hio_read_upstream(hio_t* io) {
 void hio_read_upstream_on_write_complete(hio_t* io, const void* buf, int writebytes) {
 void hio_read_upstream_on_write_complete(hio_t* io, const void* buf, int writebytes) {
     hio_t* upstream_io = io->upstream_io;
     hio_t* upstream_io = io->upstream_io;
     if (upstream_io && hio_write_is_complete(io)) {
     if (upstream_io && hio_write_is_complete(io)) {
+        hio_setcb_write(io, NULL);
         hio_read(upstream_io);
         hio_read(upstream_io);
     }
     }
 }
 }