-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Try making SuperSocket.Kestrel support Detach #765
Conversation
@@ -412,5 +423,16 @@ protected void OnError(string message, Exception e = null) | |||
else | |||
Logger?.LogError(message); | |||
} | |||
|
|||
protected void SupplyEnd() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These methods are not required by other derived classes, so probably you can leave them in KestrelPopeConnection.
if (Options.ReadAsDemand) | ||
{ | ||
var defaultObjectPipe = new DefaultObjectPipeWithSupplyControl<TPackageInfo>(); | ||
_supplyController = defaultObjectPipe; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you don't have to do this. Because the packagePipe will be pass to KestrelPipeConnection eventually.
protected override Task StartInputPipeTask<TPackageInfo>(IObjectPipe<TPackageInfo> packagePipe, | ||
CancellationToken cancellationToken) | ||
{ | ||
cancellationToken.Register(SupplyEnd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packagePipe can be read here, so yo don't need to define a field for packagePipe in the base class.
Take a look at this branch: |
UpdateLastActiveTime(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we cannot do supply control for kestrel, because the data flow network => read pipeline is out of our control. This place only can control the read from read pipeline.
No description provided.