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

Exceptions from user HttpConnection event handlers should be caught and logged #818

Closed
moozzyk opened this issue Sep 5, 2017 · 3 comments

Comments

@moozzyk
Copy link
Contributor

moozzyk commented Sep 5, 2017

Currently exceptions thrown from user's code handling Connected/Received/Closed events are not handled. For the Connected and Closed events they are ignored. For the Received event they are returned as the result of the queued task in the task queue and make it impossible to enqueue another task. This results in not raising the Received event anymore for new data received by the client.

We should catch exceptions from user's event handlers and log. They should not affect the client.

Related #816

moozzyk added a commit that referenced this issue Sep 5, 2017
Otherwise they can spoil event queue and make the client not raise the Received event anymore

Fixes: #818
moozzyk added a commit that referenced this issue Sep 5, 2017
Otherwise they can spoil event queue and make the client not raise the Received event anymore

Fixes: #818
@moozzyk
Copy link
Contributor Author

moozzyk commented Sep 5, 2017

@muratg @davidfowl - I think we should do this in alpha. Just sent a PR for this.

@moozzyk moozzyk self-assigned this Sep 5, 2017
@muratg muratg added this to the 1.0.0-alpha1 milestone Sep 5, 2017
@muratg
Copy link

muratg commented Sep 5, 2017

Sounds reasonable to me.

@moozzyk moozzyk closed this as completed in ceff4bd Sep 5, 2017
moozzyk pushed a commit that referenced this issue Oct 25, 2017
Storing exception thrown during parameter binding and rethrowing when the method is about to throw. This allows completing invocations with a HubException and keeping the connection open.
We will also no longer close the connection if parameters for client side methods cannot be bound. We will log and continue.

Fixes: #818

(Also fixing #1005 because I was just touching this line)
moozzyk pushed a commit that referenced this issue Oct 25, 2017
Storing exception thrown during parameter binding and rethrowing when the method is about to throw. This allows completing invocations with a HubException and keeping the connection open.
We will also no longer close the connection if parameters for client side methods cannot be bound. We will log and continue.

Fixes: #818

(Also fixing #1005 because I was just touching this line)
moozzyk added a commit that referenced this issue Oct 30, 2017
Late parameter binding

Storing exception thrown during parameter binding and rethrowing when the method is about to throw. This allows completing invocations with a HubException and keeping the connection open.
We will also no longer close the connection if parameters for client side methods cannot be bound. We will log and continue.

Fixes: #818

(Also fixing #1005 because I was just touching this line)
@moozzyk
Copy link
Contributor Author

moozzyk commented Oct 30, 2017

Fixed in 18f770e

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants