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

FailSafeSocket doesn't change from online to offline #72

Open
z2mi opened this issue Apr 11, 2023 · 3 comments
Open

FailSafeSocket doesn't change from online to offline #72

z2mi opened this issue Apr 11, 2023 · 3 comments

Comments

@z2mi
Copy link

z2mi commented Apr 11, 2023

Hi,
I ran client and server in 09-behavioral-design-patterns/02-state-failsafe-socket directory and It seems that FailSafeSocket never changes from online to offline state. We need some code in _safeWrite method in OnlineState to change state to offline if error happens.

@vbuzivskoy
Copy link

For some reason a socket doesn't emit 'error' event.

@shavidze
Copy link

you can see my solution:

@FranciscoMateusVG
Copy link

Created a PR to fix it.

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

4 participants