blobmsg_json: avoid redefinition of json_object
[project/libubox.git] / ustream-fd.c
index c8f0ef9..4abb530 100644 (file)
@@ -66,8 +66,9 @@ static void ustream_fd_read_pending(struct ustream_fd *sf, bool *more)
                }
 
                if (!len) {
+                       if (!s->eof)
+                               ustream_state_change(s);
                        s->eof = true;
-                       ustream_state_change(s);
                        ustream_fd_set_uloop(s, false);
                        return;
                }