1
0

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
This commit is contained in:
geby 2015-02-16 14:10:00 +00:00
parent f635c0855c
commit a9dd85dcc4

@ -1,9 +1,9 @@
{==============================================================================| {==============================================================================|
| Project : Ararat Synapse | 003.012.008 | | Project : Ararat Synapse | 003.012.009 |
|==============================================================================| |==============================================================================|
| Content: HTTP client | | Content: HTTP client |
|==============================================================================| |==============================================================================|
| Copyright (c)1999-2012, Lukas Gebauer | | Copyright (c)1999-2015, Lukas Gebauer |
| All rights reserved. | | All rights reserved. |
| | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without |
@ -33,7 +33,7 @@
| DAMAGE. | | DAMAGE. |
|==============================================================================| |==============================================================================|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| | 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. | | All Rights Reserved. |
|==============================================================================| |==============================================================================|
| Contributor(s): | | Contributor(s): |
@ -650,7 +650,12 @@ begin
Result := FSock.LastError = 0; Result := FSock.LastError = 0;
if not Result then if not Result then
begin
FSock.CloseSocket;
FAliveHost := '';
FAlivePort := '';
Exit; Exit;
end;
{if need receive response body, read it} {if need receive response body, read it}
Receiving := Method <> 'HEAD'; Receiving := Method <> 'HEAD';