Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6879529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:51:29+00:00 2026-05-27T04:51:29+00:00

Scenario: Delphi 2010 running the latest Indy version from svn trunk. I have an

  • 0

Scenario:

Delphi 2010 running the latest Indy version from svn trunk.

I have an application that uses a idHTTP to send http requests. This idHTTP is created only once and kept in memory as long as the application is running. I send a lot of web requests to the same http server (which is also an application developed by me).

I am using keep-alive to keep the socket connected.

After several requests, I get an EIdConnClosedGracefully on the client side, and no mather what I do after I get this exception, every follow request to the same server generates the same exception.

I have tried to disconnect, close the socket, clear the IOHandler buffer and nothing worked.

If I destroy the IdHttp object and recreate it after the exception occurs, everything works fine. But that is not what i want because I need to be connected to the server all the time (to avoid TIME_WAITS and so on).

Does anyone know how to handle EIdConnClosedGracefully exception on the client side and make the idHttp works after that exception occurs?

EDIT

I developed the web server myself, and i am sure not disconnecting after a client request. I know that this exception is ok, but what is not ok is the socket become unusable after that. Indy should recovery from this exception, disconnecting the socket and reconnecting it when needed. As I said, this exception is being shown to the user, not only on Delphis IDE. What i really need is an way of after getting this exception, i must be able to continue using this socket. –

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:51:30+00:00Added an answer on May 27, 2026 at 4:51 am

    Calling TIdHTTP.Disconnect(False) and TIdHTTP.IOHandler.InputBuffer.Clear() should be all you need to recover.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Scenario: I have an application that has a config table which stores the config
I have a .NET application that is launched via a Delphi program using ShellExecute.
Scenario: You have an ASP.Net webpage that should display the next image in a
Scenario: Most smartphones have a high resolution camera that generates photos that may range
I'm building a multi-threaded windows service application in Delphi XE2 which uses ADO database
When debugging a VB6 application, I have noticed that the VB6 IDE keeps any
Scenario : I have an ASP.NET MVC application developed in Visual Studio 2008. There
Scenario : I have a users table in my application. I also have two
I have a large delphi application and I am trying to keep the memory
I have a GUI application that doesn't have a memory leak. I have confirmed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.