浏览代码

2020.05.20 / Folus Wen

Actions:
1. EVSE/Modularization/Module_ProduceUtils.c close client handle when connection disconnect and receive error.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 4 年之前
父节点
当前提交
b09a0c26fc
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      EVSE/Modularization/Module_ProduceUtils.c

+ 2 - 0
EVSE/Modularization/Module_ProduceUtils.c

@@ -713,11 +713,13 @@ int main(void)
 
 
 		if(read_size == 0)
 		if(read_size == 0)
 		{
 		{
+			close(clientSockFd);
 			DEBUG_INFO("Client disconnected.\r\n");
 			DEBUG_INFO("Client disconnected.\r\n");
 			fflush(stdout);
 			fflush(stdout);
 		}
 		}
 		else if(read_size == -1)
 		else if(read_size == -1)
 		{
 		{
+			close(clientSockFd);
 			DEBUG_ERROR("Socket recv failed.\r\n");
 			DEBUG_ERROR("Socket recv failed.\r\n");
 		}
 		}