Skip to content

fix(torii): close ws properly in blocks/events stream#5101

Merged
mversic merged 1 commit intohyperledger-iroha:mainfrom
Erigara:fix_ws_close
Oct 10, 2024
Merged

fix(torii): close ws properly in blocks/events stream#5101
mversic merged 1 commit intohyperledger-iroha:mainfrom
Erigara:fix_ws_close

Conversation

@Erigara
Copy link
Copy Markdown
Contributor

@Erigara Erigara commented Sep 25, 2024

Context

Closes #5004.

Problem was that iroha tried to unconditionally closed websocket by writing into it.

During another problems were discovered as well:

  • on client side sync and async websocket stream wasn't properly closed (not reads until handshake completion)
  • on client async websocket Stream implementation was incorrect by not registering itself on receiving non binary message

Solution

Fix mentioned problems + refactoring.

@Erigara Erigara added the Bug Something isn't working label Sep 25, 2024
@Erigara Erigara self-assigned this Sep 25, 2024
@github-actions github-actions bot added the api-changes Changes in the API for client libraries label Sep 25, 2024
dima74
dima74 previously approved these changes Sep 26, 2024
Copy link
Copy Markdown
Contributor

@DCNick3 DCNick3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like quite a good improvement over what we had before

Comment thread crates/iroha_torii/src/stream.rs
Comment thread crates/iroha_torii/src/routing.rs Outdated
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
@mversic mversic merged commit 494b3e8 into hyperledger-iroha:main Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-changes Changes in the API for client libraries Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] As many WebSocket ERRORs as transactions handled

4 participants