Azure / Azure/DotNetty

none of the examples works on docker

Open
#536 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.