sseclient
sseclient copied to clipboard
Added ProtocolError to retry errors
This is a fix for: https://github.com/btubbs/sseclient/issues/52#issue-721507381
Current Behavior
The sseclient do not currently retry urllib3.ProtocolErrors. ProtocolErrors may be raised when reading raw response data at self.resp.raw.read.
As per the urllib3 docs, this error is raised when something unexpected happens mid-request/response and the sseclint should therefore try to connect again.
Solution
I've simply added the error to the except clause...