You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the client and server have exchanged graceful WS Close messages, YARP isn't gracefully closing the connection. After a few seconds the client times out and closes the connection. This causes the client (E.g. Chrome) to report a WS error (1006) rather than a graceful close (1000).
To Reproduce
Create a WebSocket connection through YARP
Close it gracefully from both sides
Observe a multi-second pause and then the client disconnects and may report an error
This reproduces with YARP running on Kestrel, HttpSys, and IIS Express. The client can be chrome, edge or even HttpClient, though that doesn't report an error.
It also reproduces in our WebSocket functional tests, causing them to take 1s or longer, vs a few ms when I tell YARP to cancel the request read.
After the client and destination have exchanged close messages the destination closes the connection. YARP sees the response copy complete, but then waits for the request side to be closed from the client. Instead it should cancel the ongoing read.
Further technical details
Version: 1.1
Reported by an internal partner
Recommend we patch this in 1.1
The text was updated successfully, but these errors were encountered:
Describe the bug
After the client and server have exchanged graceful WS Close messages, YARP isn't gracefully closing the connection. After a few seconds the client times out and closes the connection. This causes the client (E.g. Chrome) to report a WS error (1006) rather than a graceful close (1000).
To Reproduce
This reproduces with YARP running on Kestrel, HttpSys, and IIS Express. The client can be chrome, edge or even HttpClient, though that doesn't report an error.
It also reproduces in our WebSocket functional tests, causing them to take 1s or longer, vs a few ms when I tell YARP to cancel the request read.
reverse-proxy/test/ReverseProxy.FunctionalTests/WebSocketTests.cs
Line 26 in b9f43dd
I think the problem is here:
reverse-proxy/src/ReverseProxy/Forwarder/HttpForwarder.cs
Line 593 in b9f43dd
After the client and destination have exchanged close messages the destination closes the connection. YARP sees the response copy complete, but then waits for the request side to be closed from the client. Instead it should cancel the ongoing read.
Further technical details
Version: 1.1
Reported by an internal partner
Recommend we patch this in 1.1
The text was updated successfully, but these errors were encountered: