Fix detection of loop request (#284)

This commit is contained in:
Tindy X
2020-12-19 23:52:37 +08:00
parent a67738473b
commit a57906c9a6

View File

@@ -171,7 +171,7 @@ void OnReq(evhttp_request *req, void *args)
//std::cerr<<"Accept connection from client "<<client_ip<<":"<<client_port<<"\n";
writeLog(0, "Accept connection from client " + std::string(client_ip) + ":" + std::to_string(client_port), LOG_LEVEL_DEBUG);
if(internal_flag != NULL && strcmp(internal_flag, "1") == 0)
if(internal_flag != NULL) //check for flag existence
{
evhttp_send_error(req, 500, "Loop request detected!");
return;