metalbear-co / mirrord

Connect your local process and your cloud environment, and run local code in cloud conditions.
https://mirrord.dev
MIT License
3.83k stars 105 forks source link

many node / nonblocking connect fails #1484

Open aviramha opened 1 year ago

aviramha commented 1 year ago

when running the many requests tests on node, we get stuck only on the part of "connect" and until we get to the part where we write the connection times out. Right now even if the socket is nonblocking, we block until we get a response. The solution would probably be to move the part of creating a local socket and listening on it to be before we even send the request, then not block for answer for connect when socket is nonblocking. One issue is that we need to set the local address that comes from the remote - we can do it when the connection is actually made since I assume none will call getsockname before it succeeds. Another part of the solution would be to make the agent connect as part of the socket handling socket, so it itself wont block until the connect is done.

eyalb181 commented 1 year ago

Pending protocol revamp #1353

eyalb181 commented 11 months ago

@infiniteregrets Any chance this was solved by @Razz4780 's internal proxy refactor? Could you retest?