Topic: Socket Error # 10054 Connection reset by peer.
When getting the HTML Contents from an URL using HTTPGet I'm getting the following error message "Socket Error # 10054 Connection reset by peer" only when the application has been idle for a while. If I'm constantly using the application the error does not show up, it only shows when the application has not been use for a while.
Below is a sample code I use and even if I use the TRY and EXCEPT the error message shows up. Any Ideas how to troubleshoot this issue. Is there a HTTPGet.Free option to free the TCP connection.
url:=frm_main.Edit1.Text;
try
get_url:= HTTPGet(url);
frm_main.Memo1.Text:= get_url;
except
if ExceptionMessage <> 'Socket Error # 10054' then frm_main.Memo1.Lines.Add('Unknown Error') else frm_main.Memo1.Lines.Add(ExceptionMessage);
end;