about summary refs log tree commit homepage
path: root/mgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'mgmt.c')
-rw-r--r--mgmt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mgmt.c b/mgmt.c
index 3468e24..a6a1ff5 100644
--- a/mgmt.c
+++ b/mgmt.c
@@ -221,8 +221,11 @@ parse:
         } else {
                 switch (errno) {
                 case_EAGAIN:
-                        if ((buf_len > 0) && (mgmt->rbuf == NULL))
-                                mgmt->rbuf = mog_rbuf_detach(rbuf);
+                        if (buf_len > 0) {
+                                if (mgmt->rbuf == NULL)
+                                        mgmt->rbuf = mog_rbuf_detach(rbuf);
+                                mgmt->rbuf->rsize = buf_len;
+                        }
                         return MOG_NEXT_WAIT_RD;
                 case EINTR: goto reread;
                 case ECONNRESET: