From: doggie tame <tame_doggie@yahoo.com>
To: pgsql-odbc@postgresql.org
Subject: app crashes if lost connection during query, seems to be a bug.
Date: Fri, 7 Oct 2005 14:26:19 -0700 (PDT)
Message-ID: <20051007212619.71296.qmail@web30012.mail.mud.yahoo.com> (raw)
hi, there
application crashes if lost connection during query
(such as server is shuted down in immediate mode).
it's due to that after connection closed, the socket
flush funciton, SOCK_flush_output, is still trying to
write/flush to the non-exist socket, during the socket
destruction stage.
the socket should be marked as "CLOSED" when
connection is lost, such as, in socket.c
UCHAR
SOCK_get_next_byte(SocketClass *self)
{
......
if (self->buffer_filled_in == 0)
{
self->errornumber = SOCKET_CLOSED;
self->errormsg = "Socket has been
closed.";
self->buffer_filled_in = 0;
self->socket=-1; //@mark the socket
"CLOSED"!
return 0;
}
}
return self->buffer_in[self->buffer_read_in++];
}
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: tame_doggie@yahoo.com
Subject: Re: app crashes if lost connection during query, seems to be a bug.
In-Reply-To: <20051007212619.71296.qmail@web30012.mail.mud.yahoo.com>
References: <20051007212619.71296.qmail@web30012.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox