소스 검색

[Pal/Linux] Do not set SO_LINGER on socket during socket_close()

Previously, Linux PAL set SO_LINGER with a zero timeout before closing
the socket. Among other things, this led to ab (ApacheBench) reporting
failed requests when running nginx/lighttpd on Graphene, because the TCP
connection was not closed cleanly. This commit removes setting
SO_LINGER, similarly to Linux-SGX PAL.
Thomas Knauth 6 년 전
부모
커밋
9f37aa77b1
1개의 변경된 파일0개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 5
      Pal/src/host/Linux/db_sockets.c

+ 0 - 5
Pal/src/host/Linux/db_sockets.c

@@ -956,11 +956,6 @@ struct __kernel_linger {
 
 static int socket_close(PAL_HANDLE handle) {
     if (handle->sock.fd != PAL_IDX_POISON) {
-        struct __kernel_linger l;
-        l.l_onoff  = 1;
-        l.l_linger = 0;
-        INLINE_SYSCALL(setsockopt, 5, handle->sock.fd, SOL_SOCKET, SO_LINGER, &l,
-                       sizeof(struct __kernel_linger));
         INLINE_SYSCALL(close, 1, handle->sock.fd);
         handle->sock.fd = PAL_IDX_POISON;
     }