WebTransport.draining is a promise that resolves when the server indicates that the WebTransport session will be gracefully retired. Applications can use this signal to establish a replacement session while existing streams and the current session remain usable.
A WebTransport server may need to retire a session for maintenance, load balancing, deployment, or connection-lifetime management. Without a draining signal, an application learns about this only when the session closes, which can cause an avoidable interruption while a replacement connection is established. The draining promise gives the application advance notice without changing the lifetime or usability of the current session.
Docs: https://github.com/w3c/webtransport/blob/main/explainer.md#11-handling-session-draining
Explainers: https://github.com/w3c/webtransport/blob/main/explainer.md#11-handling-session-draining