none of the examples works on docker
Open
- Dominant language
- C#
- Stars
- 4.3k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/Azure/DotNetty/blob/dev/examples/Discard.Client/Program.cs#L56
Console.Readline(); is not blocking in docker
https://forums.docker.com/t/c-console-readline-ends-in-infinite-loop/86754
a quick fix for that would be to use :
however even if the result seems similar it doesn't do exactly the same thing (one read any line, the other one only read cancelkeypress events)
```
private static readonly AutoResetEvent _closingEvent = new AutoResetEvent(false);
Console.CancelKeyPress += ((s, a) =>
{
_closingEvent.Set();
});
_closingEvent.WaitOne();
```
Contributor guide
Assessment
This issue has not been assessed yet.