When handling server-streaming responses via the async Iterable returned by the respective method call on a PromiseClient
, how do you handle errors, especially, loss of connection to the server?
It would appear that this does not abort the loop or trigger an exception, the for await (let msg of …)
just gets stuck. If this can be detected somehow, how to get the loop to abort?
Edit: Nevermind, I figured out this only happens when the server is terminated in specific ways. If I terminate mine (a Go application) when run manually, I get exceptions, but when I run it via modd, restarts due to changes or terminating modd don't trigger them. Not sure about the difference (modd interrupting the application triggers a context cancellation and a shutdown delay during which HTTP connections should be terminated cleanly), maybe the TCP connection is left half-open.
Owner Name | bufbuild |
Repo Name | connect-es |
Full Name | bufbuild/connect-es |
Language | TypeScript |
Created Date | 2022-02-16 |
Updated Date | 2023-03-24 |
Star Count | 852 |
Watcher Count | 20 |
Fork Count | 33 |
Issue Count | 17 |
Issue Title | Created Date | Updated Date |
---|