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

fix auto reconnect after stop bug #707

Merged
merged 19 commits into from
Nov 4, 2019

Conversation

wanlwanl
Copy link
Member

No description provided.

@wanlwanl wanlwanl force-pushed the wanl/fix-auto-reconnect-after-stop-bug branch from 747af20 to 289dfd6 Compare October 29, 2019 08:12
@wanlwanl wanlwanl changed the title Wanl/fix auto reconnect after stop bug []fix auto reconnect after stop bug Oct 31, 2019
@wanlwanl wanlwanl changed the title []fix auto reconnect after stop bug [WIP] fix auto reconnect after stop bug Oct 31, 2019
@wanlwanl wanlwanl added the draft label Oct 31, 2019
@wanlwanl wanlwanl changed the title [WIP] fix auto reconnect after stop bug fix auto reconnect after stop bug Oct 31, 2019
@wanlwanl wanlwanl removed the draft label Oct 31, 2019
@wanlwanl wanlwanl changed the title fix auto reconnect after stop bug [WIP] fix auto reconnect after stop bug Oct 31, 2019
@wanlwanl wanlwanl force-pushed the wanl/fix-auto-reconnect-after-stop-bug branch from af9fd4b to 3b85319 Compare October 31, 2019 05:52
@wanlwanl wanlwanl changed the title [WIP] fix auto reconnect after stop bug fix auto reconnect after stop bug Oct 31, 2019
private readonly ServiceProvider _serviceProvider;

// for test only
internal IServiceConnectionContainer ConnectionContainer { get; }
Copy link
Member

Choose a reason for hiding this comment

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

Why we don't move this property into its relevant TestServiceHubContext class?

And even if we have to define an internal property here, we can use

get => _serviceProvider.GetService<IServiceConnectionContainer>()

instead of initializing it in the constructor.

Copy link
Member

Choose a reason for hiding this comment

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

init in .ctor is better as it is only set once

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we create a inner class and make all metheds and fields only placed in this inner class? this makes the outer class clean.

@wanlwanl wanlwanl merged commit 6a17e9e into dev Nov 4, 2019
@wanlwanl wanlwanl deleted the wanl/fix-auto-reconnect-after-stop-bug branch November 4, 2019 03:10
@wanlwanl wanlwanl restored the wanl/fix-auto-reconnect-after-stop-bug branch November 5, 2019 09:33
@wanlwanl wanlwanl deleted the wanl/fix-auto-reconnect-after-stop-bug branch November 5, 2019 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants