Przeglądaj źródła

Remove obsolete TODO comment

bel 8 lat temu
rodzic
commit
f1a4e9e50b
1 zmienionych plików z 3 dodań i 4 usunięć
  1. 3 4
      src/civetweb.c

+ 3 - 4
src/civetweb.c

@@ -4380,7 +4380,7 @@ push(struct mg_context *ctx,
 			}
 		} else
 #endif
-		    if (fp != NULL) {
+	    if (fp != NULL) {
 			n = (int)fwrite(buf, 1, (size_t)len, fp);
 			if (ferror(fp)) {
 				n = -1;
@@ -4423,8 +4423,7 @@ push(struct mg_context *ctx,
 			return -1;
 		}
 
-		/* This code is not reached in the moment.
-		 * ==> Fix the TODOs above first. */
+		/* Only in case n=0 (timeout), repeat calling the write function */
 
 		if (timeout > 0) {
 			clock_gettime(CLOCK_MONOTONIC, &now);
@@ -9925,7 +9924,7 @@ handle_websocket_request(struct mg_connection *conn,
 
 	/* Step 4: Check if there is a responsible websocket handler. */
 	if (!is_callback_resource && !lua_websock) {
-		/* There is no callback, an Lua is not responsible either. */
+		/* There is no callback, and Lua is not responsible either. */
 		/* Reply with a 404 Not Found or with nothing at all?
 		 * TODO (mid): check the websocket standards, how to reply to
 		 * requests to invalid websocket addresses. */