[browser][websocket] Fix for Close Description validation (#45536)
authorKenneth Pouncey <kjpou@pt.lu>
Tue, 5 Jan 2021 05:29:08 +0000 (06:29 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Jan 2021 05:29:08 +0000 (06:29 +0100)
commit867ba801d1a609f4cbb6e5847a3ec030adb2d8f4
treeab591dab5f7600e00e23bca3e75169ee17368cc3
parent65bcfd03c73e0cc8fb6f661e7130712382533f1f
[browser][websocket] Fix for Close Description validation (#45536)

* [browser][websocket] Fix for Close Description validation

- Issue https://github.com/dotnet/runtime/issues/45531
- The description validation exception was not being percolated through to the unit test

* Remove test code

* Address review comments.  Wrap in a try/catch that will catch that exception and store it into a task to be returned.

* Fix merge conflict

* Remove active issue

Co-authored-by: Larry Ewing <lewing@microsoft.com>
src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs
src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs