Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

astralhpi
Copy link

Problem

Custom Socket polyfill implementation was causing memory leaks in Cloudflare Workers environments.

Solution

Removed custom net/tls polyfills since Cloudflare Workers now provide built-in polyfills for these modules.

Changes

  • Removed custom net/tls polyfill imports from Cloudflare build
  • Updated transpilation to use Cloudflare's built-in polyfills instead

Result

  • Fixes memory leak in Worker environments

Reproducer: https://github.com/astralhpi/cf-worker-memory-leak-sample

Cloudflare Workers now provide built-in net and tls polyfills,
making custom polyfills unnecessary and fixing memory leaks
caused by the previous Socket polyfill implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant