Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ClientRequest): MockSocket does not have _handle in passthrough #706

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mikicho
Copy link
Contributor

@mikicho mikicho commented Feb 8, 2025

Since the MockSocket never actually connects to a server, it does not initialize its _handle property. As a result, this push creates a connect listener with every push.

@kettanaito Please guide me in the leftovers:

  1. Fix the test name.
  2. Should the test be in this file?
  3. this._handle is private; there is an undocumented handle option in the Socket constructor. How do you think we should handle this?

Fixes: nock/nock#2830

@mikicho mikicho requested a review from kettanaito February 8, 2025 23:42
@rossipedia
Copy link

I wonder if this could be the underlying cause of mswjs/msw#2405?

@mikicho
Copy link
Contributor Author

mikicho commented Mar 21, 2025

Yes.. it might fix this as well. but I'm not sure about it

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.

Possible EventEmitter memory leak when used together with MongoDBContainer (Testcontainers)
2 participants