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

catch unreachable url #226

Open
theo92hoo opened this issue Dec 5, 2016 · 4 comments
Open

catch unreachable url #226

theo92hoo opened this issue Dec 5, 2016 · 4 comments
Labels

Comments

@theo92hoo
Copy link

Hello~ how can i catch error once unreachable url I inserted?

@davidwdan
Copy link
Member

@theo92hoo can you provide more information and the code needed to reproduce the what you're trying to do?

@theo92hoo
Copy link
Author

$connection =  new Connection(
    [
       "realm"   => 'test',
       "url"     => 'ws://127.0.0.1:9091'
    ]
 );

$connection->open();

for example, the actual port set on my server side was 9090 and i try to mis-inserted the port as 9091 in client side, therefore i hope it will return handshake error to me, but it didn't. Is it anyways for me to get the error? thx

@mbonneau mbonneau added the bug label Jul 14, 2017
@davidwdan
Copy link
Member

@mbonneau should $connection->open() throw an exception when this happens?

@mbonneau
Copy link
Member

This issue should be moved to the thruway/client. First, we should decide if we are going to keep the Connection object moving forward.

The open method returns nothing and most errors would be async. The only place to notify about an error would be to listen to the error emits (which I have not even checked to see if this is a problem if you do listen to that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants