浏览代码

Remove obsolete TODO comment

bel 8 年之前
父节点
当前提交
f1a4e9e50b
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/civetweb.c

+ 3 - 4
src/civetweb.c

@@ -4380,7 +4380,7 @@ push(struct mg_context *ctx,
 			}
 			}
 		} else
 		} else
 #endif
 #endif
-		    if (fp != NULL) {
+	    if (fp != NULL) {
 			n = (int)fwrite(buf, 1, (size_t)len, fp);
 			n = (int)fwrite(buf, 1, (size_t)len, fp);
 			if (ferror(fp)) {
 			if (ferror(fp)) {
 				n = -1;
 				n = -1;
@@ -4423,8 +4423,7 @@ push(struct mg_context *ctx,
 			return -1;
 			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) {
 		if (timeout > 0) {
 			clock_gettime(CLOCK_MONOTONIC, &now);
 			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. */
 	/* Step 4: Check if there is a responsible websocket handler. */
 	if (!is_callback_resource && !lua_websock) {
 	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?
 		/* Reply with a 404 Not Found or with nothing at all?
 		 * TODO (mid): check the websocket standards, how to reply to
 		 * TODO (mid): check the websocket standards, how to reply to
 		 * requests to invalid websocket addresses. */
 		 * requests to invalid websocket addresses. */