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