X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5742ED83C7 for ; Fri, 7 Oct 2005 18:26:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73785-09 for ; Fri, 7 Oct 2005 21:26:17 +0000 (GMT) Received: from web30012.mail.mud.yahoo.com (web30012.mail.mud.yahoo.com [68.142.201.215]) by svr1.postgresql.org (Postfix) with SMTP id B006BDA4A5 for ; Fri, 7 Oct 2005 18:26:17 -0300 (ADT) Received: (qmail 71298 invoked by uid 60001); 7 Oct 2005 21:26:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=wtESUytj2ROz5FFcqst4TKjxT2jr6sjcSRvV7/ZVHRUeURbQwdRyTzEzmgOI5vIXe4K9HIroxFKu4K4/lGOk6V11xylliu4sz7sWwJq0STHkCCN0N5/jvwYQzrw/ygOTlfLCcaOwRqIeRdEE4DyqjyDfepU7eN0t9vTekzAhvzA= ; Message-ID: <20051007212619.71296.qmail@web30012.mail.mud.yahoo.com> Received: from [216.174.114.193] by web30012.mail.mud.yahoo.com via HTTP; Fri, 07 Oct 2005 14:26:19 PDT Date: Fri, 7 Oct 2005 14:26:19 -0700 (PDT) From: doggie tame Subject: app crashes if lost connection during query, seems to be a bug. To: pgsql-odbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.802 required=5 tests=[AWL=0.428, DNS_FROM_RFC_ABUSE=0.374] X-Spam-Level: X-Archive-Number: 200510/28 X-Sequence-Number: 6130 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