From a9dd85dcc49932a1d2896ff551c6d139b79691e8 Mon Sep 17 00:00:00 2001 From: geby Date: Mon, 16 Feb 2015 14:10:00 +0000 Subject: [PATCH] httpsend.pas - fixed keepalive on socket error git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@200 7c85be65-684b-0410-a082-b2ed4fbef004 --- httpsend.pas | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/httpsend.pas b/httpsend.pas index 695a00a..d44831e 100644 --- a/httpsend.pas +++ b/httpsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 003.012.008 | +| Project : Ararat Synapse | 003.012.009 | |==============================================================================| | Content: HTTP client | |==============================================================================| -| Copyright (c)1999-2012, Lukas Gebauer | +| Copyright (c)1999-2015, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c) 1999-2012. | +| Portions created by Lukas Gebauer are Copyright (c) 1999-2015. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -650,7 +650,12 @@ begin Result := FSock.LastError = 0; if not Result then + begin + FSock.CloseSocket; + FAliveHost := ''; + FAlivePort := ''; Exit; + end; {if need receive response body, read it} Receiving := Method <> 'HEAD';