Files

9 lines
243 B
JavaScript
Raw Permalink Normal View History

2025-01-04 00:34:03 +01:00
export const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }) => {
if (keepAlive !== true) {
return;
}
request.on("socket", (socket) => {
socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
});
};