Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Disposing of a custom Bootstrapper makes NancyHost fail silently #3005

Open
1 task done
Demiu opened this issue Mar 9, 2020 · 0 comments
Open
1 task done

Disposing of a custom Bootstrapper makes NancyHost fail silently #3005

Demiu opened this issue Mar 9, 2020 · 0 comments

Comments

@Demiu
Copy link

Demiu commented Mar 9, 2020

Description

Disposing of a Bootstrapper used in a NancyHost causes said host to eternally load pages. I know this is more of a user mistake, but Nancy should somehow notify that something went wrong instead of silently failing and loading forever, which hints more at a firewall or network interface issue rather than application issue. Perhaps it should return a 500 or throw an exception.

Steps to Reproduce

Just this below code + a smallest possible module with a Get for testing. I am using a custom bootstrapper here just as a possible use-case where this might occur

using (var bootstrapper = new MyBootstrapper(dependency)) {
    host = new NancyHost(bootstrapper, myUri);
    host.Start();
}
Console.ReadKey();

System Configuration

  • Nancy version: v2.0.0
  • Nancy host
    • Nancy.Hosting.Self
  • Environment (Operating system, version and so on): Win10 x64
  • .NET Framework version: .NET Framework 4.6.1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant