jgauffin / Griffin.Framework

Application framework for Business Applications
http://griffinframework.net
168 stars 62 forks source link

Problem with unhandled SemaphoreFullException #87

Closed bhadorn closed 6 years ago

bhadorn commented 6 years ago

I use the HttpServer in a plugin than can be dynamically loaded and unloaded. When unloading the WebServer plugin, I get sometimes an unhandled SemaphoreFullException.

I had to modify the code in the following class: Griffin.Net.Channels.TcpChannel in method OnSendCompleted()

catch (Exception ex) { try { _sendLock.Release(); } catch(SemaphoreFullException) { } OnChannelFailure(ex); }

Thank you for adding this changes in the next nuget release :-)

bhadorn commented 6 years ago

Needs an other solution. The following code does not terminate the thread and leads to other problems. The easiest solution is to disable the exception for Griffin.Core assembly.