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

bind failure in connect() remains unreported #108

Closed
bwoebi opened this issue Dec 29, 2023 · 0 comments
Closed

bind failure in connect() remains unreported #108

bwoebi opened this issue Dec 29, 2023 · 0 comments

Comments

@bwoebi
Copy link
Member

bwoebi commented Dec 29, 2023

<?php

include "vendor/autoload.php";
Amp\Socket\connect("127.0.0.1:80", (new Amp\Socket\ConnectContext)->withBindto("127.0.0.2"));

This will silently connect from 127.0.0.1 instead of failing with the following warning: Warning: Failed to bind to '127.0.0.2:0', system said: Can't assign requested address.
(On a mac 127.0.0.1 is the only available local IP, and not the full 127.0.0.0/8 - hence I had this happen, to reproduce on linux use a different IP alltogether.)

This seems to be completely silenced by the set_error_handler(static fn () => true);.

trowski added a commit that referenced this issue Dec 31, 2023
trowski added a commit that referenced this issue Dec 31, 2023
trowski added a commit that referenced this issue Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant