sseclient icon indicating copy to clipboard operation
sseclient copied to clipboard

Added ProtocolError to retry errors

Open hampusjohansson1 opened this issue 4 years ago • 0 comments

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...

hampusjohansson1 avatar Nov 02 '20 11:11 hampusjohansson1