Update uvhttp_server.c

This commit is contained in:
Dengfeng Liu 2016-11-17 11:38:20 +08:00 committed by GitHub
parent 0d1f95d8ec
commit bd92b36c2a

View File

@ -2,6 +2,7 @@
#include "uvhttp_base.h"
#include "uvhttp_server_internal.h"
#include "uvhttp_ssl_server.h"
#include "http_parser.h"
#include <stdarg.h>
static void server_session_connected(
@ -525,13 +526,13 @@ static void session_closed(
)
{
struct uvhttp_session_obj* session_obj = (struct uvhttp_session_obj*)handle->data;
//如果关闭连接之前有错误导致request_end没有调用则先通知request_end
//如果关闭连接之前有错误导致request_end没有调用则先通知request_end
session_error( session_obj);
//关闭连接回调
//关闭连接回调
if ( session_obj->end_callback) {
session_obj->end_callback( session_obj);
}
//删除会话数据
//删除会话数据
session_delete( session_obj);
}
@ -586,7 +587,7 @@ static void session_reset(
session_obj->request.uri = 0;
}
//是否已经接收完成request请求
//是否已经接收完成request请求
session_obj->request_finished = 0;
session_obj->last_error = UVHTTP_OK;
}
@ -727,4 +728,4 @@ int uvhttp_session_write(
}
}
return ret;
}
}