Re: Socket Error #10061

Giganews Newsgroups
Subject: Re: Socket Error #10061
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Wed, 26 Jul 2006

"slappyhack" <slappyha…@gmail.com> wrote in message
news:A4A5190D9B01E340slappyha…@gmail.com...

> I get the following error ocassionally:
>
> myprocess raised exception class EIdSocketError with message
> 'Socket Error 3 10061 Connection refused'

There are two possible causes for that error:

1) there is no server socket running on IP/Port that you are trying to
connect to

2) there is a server socket running, but it has too many pending connections
in its queue and cannot accept any more until empty slots appear in the
queue.

> I need to know what I should be looking for to fix this

There is no fix for it, because it is not broken.  All you can do on the
client side is verify that the IP/Port settings being used are accurate.
Beyond that, the issue is on the server side.

> or at least trap it from the user.

Simply wrap the Connect() in a try..except block.

Gambit

Replies

In response to

Socket Error #10061 posted by slappyhack on Wed, 26 Jul 2006