Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

HubConnection hangs if parsing a hub message throws #816

@moozzyk

Description

@moozzyk

If parsing a hub message on the client side throws (e.g. due to invalid number of parameters) may hang forever. This may happen if client is awaiting for a completion message but a previous client side method invocation threw. This is because if a task in the task queue throws the queue will not schedule a new task.

We should at the hub connection level:

  • handle cases where it is easy to make a mistake (invalid parameter count or mismatched type)
  • in case of legitimate exceptions (e.g. invalid format) - close the connection

At the http connection level:

  • Close the connection if an exception is throw from the a queued task - nothing else can be queued if the queue ends up in this state

EDIT

Actually we should catch exceptions from users code and log. Only exceptions from parsing should result in closing the connection.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions