Selaa lähdekoodia

Fix mg_send_chunk return value check in example (#1026)

bel2125 3 vuotta sitten
vanhempi
commit
a55f5f72fc
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      examples/embedded_c/embedded_c.c

+ 1 - 1
examples/embedded_c/embedded_c.c

@@ -655,7 +655,7 @@ PostResponser(struct mg_connection *conn, void *cbdata)
 	while (r > 0) {
 		r_total += r;
 		s = mg_send_chunk(conn, buf, r);
-		if (r != s) {
+		if (s <= 0) {
 			/* Send error */
 			break;
 		}