8 lines
243 B
JavaScript
8 lines
243 B
JavaScript
export const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }) => {
|
|
if (keepAlive !== true) {
|
|
return;
|
|
}
|
|
request.on("socket", (socket) => {
|
|
socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
|
|
});
|
|
};
|