From: | "Steffen Heil (Mailinglisten)" <lists(at)steffen-heil(dot)de> |
---|---|
To: | Leonardo Frittelli <leonardo(dot)frittelli(at)gmail(dot)com>, Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Connection terminated by the server causes deadlock in jdbc client side connection |
Date: | 2015-10-08 16:46:40 |
Message-ID: | 543c7dab3e334742b02d18dcf7b2c49a@exchange.sh-solutions.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Leonardo Frittelli | 2015-10-08 17:45:40 | Re: Connection terminated by the server causes deadlock in jdbc client side connection |
Previous Message | Steffen Heil (Mailinglisten) | 2015-10-08 16:43:29 | Re: Connection terminated by the server causes deadlock in jdbc client side connection |