~ubuntu-branches/ubuntu/maverick/pdns/maverick-updates

« back to all changes in this revision

Viewing changes to pdns/unix_utility.cc

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Haas
  • Date: 2009-02-25 23:25:51 UTC
  • mfrom: (1.1.7 upstream) (12.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090225232551-ts3d9k9q0ti442i9
Tags: 2.9.22-1
New upstream version (closes: #513409).

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
int Utility::closesocket( Utility::sock_t socket )
42
42
{
43
43
  int ret=::close(socket);
44
 
  if(ret < 0)
 
44
  if(ret < 0 && errno == ECONNRESET) // see ticket 192, odd BSD behaviour
 
45
    return 0;
 
46
  if(ret < 0) 
45
47
    throw AhuException("Error closing socket: "+stringerror());
46
48
  return ret;
47
49
}