You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
If multiple addresses are being used in ServerFactory and an exception is thrown in engine.CreateServer, then the proceeding disposables are not cleaned up properly. Consider changing the method implementation to something similar to:
public IDisposable Start(IServerInformationserverInformation,Func<IFeatureCollection,Task>application){vardisposables=newList<IDisposable>();vardispose=new Disposable(()=>{foreach(var disposable in disposables){ disposable.Dispose();}});varinformation=(ServerInformation)serverInformation;varengine=new KestrelEngine(_libraryManager);
engine.Start(1);try{foreach(var address in information.Addresses){
disposables.Add(engine.CreateServer(
address.Scheme,
address.Host,
address.Port,async frame =>{varrequest=new ServerRequest(frame);await application.Invoke(request.Features);}));}
disposables.Add(engine);returndispose;}catch(Exception){
dispose.Dispose();throw;}}
The text was updated successfully, but these errors were encountered:
If multiple addresses are being used in ServerFactory and an exception is thrown in engine.CreateServer, then the proceeding disposables are not cleaned up properly. Consider changing the method implementation to something similar to:
The text was updated successfully, but these errors were encountered: