Re: Connection terminated by the server causes deadlock in jdbc client side connection - Mailing list pgsql-jdbc

From Steffen Heil (Mailinglisten)
Subject Re: Connection terminated by the server causes deadlock in jdbc client side connection
Date
Msg-id 543c7dab3e334742b02d18dcf7b2c49a@exchange.sh-solutions.de
Whole thread Raw
In response to Re: Connection terminated by the server causes deadlock in jdbc client side connection  (Leonardo Frittelli <leonardo.frittelli@gmail.com>)
Responses Re: Connection terminated by the server causes deadlock in jdbc client side connection
List pgsql-jdbc
Hi


> I was referring to the fact that the TCP connection is indeed left 'half
> open'
> with the jdbc client side still assuming it's 'properly' open and thus
> trying to
> send a graceful close command over the socket ("X" in v2 or "X4" in v3) . It
> is
> this action that indefinitely blocks the client thread, which is then no
> longer
> usable by the application.

But it should not block indefinitely. Why would it?
If the server closed the connection, it should reply with a RST and the client
should detect that and throw an IOException( "Socket closed" ).


> All of this said, I still think it is conceptually incorrect to attempt a
> graceful
> closure after an IO error in the client.

Agreed. IOExceptions on blocking sockets usually indicate that you cannot do
anything good with them anymore.


Regards,
  Steffen



Attachment

pgsql-jdbc by date:

Previous
From: "Steffen Heil (Mailinglisten)"
Date:
Subject: Re: Connection terminated by the server causes deadlock in jdbc client side connection
Next
From: Leonardo Frittelli
Date:
Subject: Re: Connection terminated by the server causes deadlock in jdbc client side connection