Skip to content

TIME_WAIT issue #969

Answered by TextTL
TextTL asked this question in Q&A
Discussion options

You must be logged in to vote

Updated

If I use

agent = new http.Agent({keepAlive: true });

agent = new http.Agent({keepAlive: true});
const webServProxy = createProxyMiddleware({
  agent: agent,
  target: 'http://127.0.0.1:8080', 
  changeOrigin: true, 

  onError: (err, req, res, target) => {
    res.writeHead(500, {
      'Content-Type': 'text/plain',
    });
    res.end('Something went wrong.');
  }
});

Then the problem is solved.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TextTL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant