|
|
@@ -609,9 +609,9 @@ int32_t luat_lib_http_callback(void *data, void *param){
|
|
|
//LLOGD("LINK %d ON_LINE %d EVENT %d TX_OK %d CLOSED %d",EV_NW_RESULT_LINK & 0x0fffffff,EV_NW_RESULT_CONNECT & 0x0fffffff,EV_NW_RESULT_EVENT & 0x0fffffff,EV_NW_RESULT_TX & 0x0fffffff,EV_NW_RESULT_CLOSE & 0x0fffffff);
|
|
|
LLOGE("http_ctrl close %08X %d",event->ID - EV_NW_RESULT_BASE, event->Param1);
|
|
|
if (http_ctrl->luatos_mode) {
|
|
|
- http_resp_error(http_ctrl, HTTP_ERROR_CLOSE);
|
|
|
+ http_resp_error(http_ctrl, event->ID == EV_NW_RESULT_CONNECT ? HTTP_ERROR_CONNECT : HTTP_ERROR_CLOSE);
|
|
|
} else {
|
|
|
- http_ctrl->error_code = HTTP_ERROR_CLOSE;
|
|
|
+ http_ctrl->error_code = event->ID == EV_NW_RESULT_CONNECT ? HTTP_ERROR_CONNECT : HTTP_ERROR_CLOSE;
|
|
|
http_network_error(http_ctrl);
|
|
|
}
|
|
|
return -1;
|