Fix: Allows address reuse for OCSP server
Enables the SO_REUSEADDR socket option to prevent "Address already in use" errors when restarting the OCSP server, improving its reliability and availability.pull/526/head
parent
35cae80512
commit
e3915943b0
|
|
@ -345,6 +345,11 @@ int main()
|
|||
perror("socket");
|
||||
goto cleanup;
|
||||
}
|
||||
int optval = 1;
|
||||
if (setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0) {
|
||||
perror("setsockopt");
|
||||
goto cleanup;
|
||||
}
|
||||
memset(&serv_addr, 0, sizeof(serv_addr));
|
||||
serv_addr.sin_family = AF_INET;
|
||||
serv_addr.sin_addr.s_addr = INADDR_ANY;
|
||||
|
|
|
|||
Loading…
Reference in New Issue