Yortw / RSSDP

Really Simple Service Discovery Protocol - a 100% .Net implementation of the SSDP protocol for publishing custom/basic devices, and discovering all device types on a network.
http://yortw.github.io/RSSDP/
MIT License
282 stars 66 forks source link

Enable optional locking around logging write #95

Closed BruceMellows closed 5 years ago

BruceMellows commented 5 years ago

Enable optional locking around logging write which is opt-in so that clients that do not need this facility will not need to change and would not have any change in behaviour

BruceMellows commented 5 years ago

The application still crashed even the the lock was taken, so this is NOT a solution. This should be closed and rejected. Thanks.

Yortw commented 5 years ago

Hi Bruce,

Pretty disappointing that didn't solve the problem and I'm not sure what to suggest at this point, but thanks for making the PR anyway. Let me know if I can help. If you can send me a small project that reproduces the issue reliably I may be able to find time to look myself (eventually ;) ).

BruceMellows commented 5 years ago

This was embarrassingly easy to fix in the end, just remove the "output tracing to stdout" section in the .exe.config (the app is not a console app). I.E. delete the following ...

BruceMellows commented 5 years ago

Trying again (with preview)

<system.diagnostics><trace autoflush="true"><listeners><add name="consoleListener" type="System.Diagnostics.ConsoleTraceListener" /></listeners></trace></system.diagnostics>

Yortw commented 5 years ago

It's only easy when you already know how :) Glad you solved it!