kerryjiang / WebSocket4Net

A popular .NET WebSocket Client
Apache License 2.0
764 stars 273 forks source link

WebSocket.Open() doesn't hold application open. #127

Open IKnowBashFu opened 6 years ago

IKnowBashFu commented 6 years ago

Example: https://gist.github.com/IKnowBashFu/7f5a03373291ae90bbb16ef4d1e0caab

In .NET Core 2.0, WebSocket.Open() does nothing, as the application exits the moment it's run. I use a task delay to hold it open for 1 second so I can see the output, but then the application immediately closes. Your example does not show this at all, so I can't help but think this is a bug.