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

subscription to connection errors #3

Closed
aleqs opened this issue Jan 5, 2018 · 6 comments
Closed

subscription to connection errors #3

aleqs opened this issue Jan 5, 2018 · 6 comments

Comments

@aleqs
Copy link

aleqs commented Jan 5, 2018

first of all, great project. thank you for putting your time and effort into this

currently, the BittrexExchange class doesn't seem to support connection error/close listeners. hubConnection.error() is only used internally in the class and not exposed to users, and it would be very useful to have an API similar to defining a runnable in connectToWebSocket()

@CCob
Copy link
Owner

CCob commented Jan 6, 2018

Sure I'll take a look at exposing this. I suppose the idea behind this was to reconnect without library user being aware but I suppose it would be handy for library users to know and error has occurred

CCob added a commit that referenced this issue Jan 7, 2018
Added new observer function that allows users to be notified when WebSocket errors occur.
@CCob
Copy link
Owner

CCob commented Jan 7, 2018

I've added a new onWebsocketError function that allows you to register an observer for websocket errors. Let me know if this does the trick for you.

@CCob
Copy link
Owner

CCob commented Jan 7, 2018

You should be able to check out fixes for both #3 and #4 in the latest 1.0.4-SNAPSHOT

@aleqs
Copy link
Author

aleqs commented Jan 7, 2018

this is pretty good, thank you

another thing that would be nice to improve (that falls outside of the scope of the issue though) is for users to be able to manage reconnects better - i.e. pass reconnectionPeriodMillis either via constructor or via a setter. and say if the value is negative, no reconnection is scheduled - but the user can take their own action by adding the error listener via the api you just added

@CCob
Copy link
Owner

CCob commented Jan 7, 2018

Agreed, there are a few usability improvements that need doing like that. Early days yet.

@CCob
Copy link
Owner

CCob commented Jan 9, 2018

Implemented in release 1.0.4

@CCob CCob closed this as completed Jan 9, 2018
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

No branches or pull requests

2 participants