fix(server): remove invalid recv() call on listen socket
The recv() drain loop on listen_socket was incorrect - listen sockets don't have data to read. This caused Valgrind to report 'points to unaddressable byte(s)' errors during functional tests. Replaced magic number 2 with SHUT_RDWR for clarity.
This commit is contained in:
@@ -477,8 +477,7 @@ _shutdown(void)
|
||||
|
||||
parser_close();
|
||||
|
||||
shutdown(listen_socket, 2);
|
||||
char _discard; while (recv(listen_socket, &_discard, 1, 0) > 0) {}
|
||||
shutdown(listen_socket, SHUT_RDWR);
|
||||
close(listen_socket);
|
||||
|
||||
prime_free_all();
|
||||
|
||||
Reference in New Issue
Block a user