Anna-Rx / Anna

Event-driven http server library with ReactiveExtensions inspired in node.js and nancy
MIT License
140 stars 22 forks source link

dispose subscription handler on HttpServer disposing #13

Closed almostWaldo closed 9 years ago

almostWaldo commented 9 years ago

Problem: a subscrition handler is not disposed on HttpServer object destroying. As result it leads to hang threads and process. Looks like it's work-related Rx Observable collections. This problem was found with test:

[Test]
public void TestDisposing()
{
    for (var i = 0; i< 10000; i++)
        using (var server = new HttpServer("http://*:1234/"))
        {
        }
}

This test hangs before the fix and works fine after

jfromaniello commented 9 years ago

Thanks man

almostWaldo commented 9 years ago

thanks for accepting. I will wait for a new release with my commit to update the package in our project

dmalikov commented 9 years ago

@almostWaldo sure, let me bump the version and upload it to NuGet

dmalikov commented 9 years ago

1.0.1008 version is uploaded to NuGet

jfromaniello commented 9 years ago

@dmalikov thanks man!