Re: Unexpected EOF on client connection
| От | Tom Lane |
|---|---|
| Тема | Re: Unexpected EOF on client connection |
| Дата | |
| Msg-id | 9144.1029342978@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Unexpected EOF on client connection (Matthias Brunner <mb@blumenstrasse.vol.at>) |
| Список | pgsql-jdbc |
Matthias Brunner <mb@blumenstrasse.vol.at> writes:
> whenever I close a JDBC connection, the following log message is printed:
> DEBUG: pq_recvbuf: unexpected EOF on client connection
This appears to be fixed in current sources, where I read:
public void close() throws SQLException
{
if (pg_stream != null)
{
try
{
pg_stream.SendChar('X');
pg_stream.flush();
pg_stream.close();
}
catch (IOException e)
{}
pg_stream = null;
}
}
public void finalize() throws Throwable
{
close();
}
Without this, destroying the JDBC connection simply results in
unceremoniously closing the TCP connection. If you do that without
sending 'X', the backend complains ...
regards, tom lane
В списке pgsql-jdbc по дате отправления: