Is your feature request related to a problem? Please describe.
In case the socket server is not available, the library keeps retrying indefinitely we can add a max retry count to limit it
Describe the solution you'd like to see
Adding a max retry count as an option available to the user, with the default being infitie
Describe alternatives you've considered
None
Additional context
None