Closed alberk8 closed 1 year ago
I added the UseClearIdleSession() and get a runtime error.
var host = SuperSocketHostBuilder.Create<StringPackageInfo, LinePipelineFilter>(args)
.UseClearIdleSession()
.UseSession<MyUseSession>()
.ConfigureServices((context, service) =>
{
// Hosting SingleTon
}
.Build();
System.Exception: 'ClearIdleSessionMiddleware needs a middleware of ISessionContainer'
.UseInProcSessionContainer()
.UseInProcSessionContainer()
@wj8400684 That is not available when I tried it.
I need to add the nuget Supersocket.SessionContainer for it to work. One more thing is that the UseInProcSessionContainer() must be the last of the .Use ..
in the fluent code.
I am have a console app that works but it seems that supersocket is not clearing Idle Session. I test by connect client to it and It is connection is established then I pull out the network cable to simulate connection error/timeout. I waited for 10-30 minutes and there is no timeout and subsequent connecting to it increase the session count. Is there any setting I need to set to get the clear idle session to work. I am on the latest V2.0beta-17 with Net7 on Windows.