Hi,
Thank you for posting in Microsoft Q&A forum.
Error 12031 indicates that the connection with the server has been reset or is not properly connected.
You may check your PatchDownloader.log to see which update failed with Error code 12031, if the Configuration Manager client is installed on the site server, this log file is on the site server in %windir%\Program Files\SMS_CCM\Logs.
Then try to manually use the specified URL in your browser.
Like Jason mentioned in another thread, this error is indicative of issue between you and the content location so could be anything in your network, your ISPs network, and Microsoft including (but not limited not) a proxy, a content filter, some security software, a bad switch, a bad NIC, a bad NIC driver, etc.
You may refer to the discussion of the similar thread to see if it helps:
https://social.technet.microsoft.com/Forums/en-US/209676e5-42c1-4347-ac39-272af7dd53a1/downloading-kb4032188-failed-with-hr0x80072eff?forum=ConfigMgrCompliance
If the response is helpful, please click "Accept Answer" and upvote it.
Regards,
Allen