Explorar o código

update:统一http_close

Dozingfiretruck %!s(int64=3) %!d(string=hai) anos
pai
achega
de3baf3b3b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      components/network/libhttp/luat_http_client.c

+ 2 - 2
components/network/libhttp/luat_http_client.c

@@ -135,7 +135,6 @@ static int32_t l_http_callback(lua_State *L, void* ptr){
 		luat_cbcwait(L, idp, 3); // code, headers, body
 	}
 exit:
-	http_close(http_ctrl);
 	return 0;
 }
 
@@ -411,7 +410,8 @@ next:
 	}else if(event->ID == EV_NW_RESULT_TX){
 
 	}else if(event->ID == EV_NW_RESULT_CLOSE){
-
+		http_close(http_ctrl);
+		return 0;
 	}
 	ret = network_wait_event(http_ctrl->netc, NULL, 0, NULL);
 	LLOGD("network_wait_event %d", ret);