Is there some method to distinguish network error or server reject error
#1,970 opened on Jan 16, 2023
Repository metrics
- Stars
- (6,985 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Hi, I'm using ffmpegrecorder to make rtmp push , when something wrong, I can get error message from start/record method, because I want to do more retry times to half an hour when network is error, and only 10 seconds when server reject. Is there some method can I get the error reason?
I got the error message from exception, include the socket error -32/-104/-110/... error code, As I know:
-110/-111 means connect failed/ read/write timeout.
-104 is reset by server
other code I'm not sure.
but the code, I can't get it easily, must parse from the exception string.
Is there some advice about my propose? thank you !