[pgjdbc/pgjdbc] 975244: fix: Make sure socket is closed if an exception is...
[pgjdbc/pgjdbc] 975244: fix: Make sure socket is closed if an exception is...
От:
Dave Cramer <noreply@github.com>
Дата:
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: 975244168c7cd70a8f271faa7e8509a53212fd9b
https://github.com/pgjdbc/pgjdbc/commit/975244168c7cd70a8f271faa7e8509a53212fd9b
Author: Dave Cramer
Date: 2022-11-30 (Wed, 30 Nov 2022)
Changed paths:
M pgjdbc/src/main/java/org/postgresql/core/PGStream.java
M pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java
Log Message:
-----------
fix: Make sure socket is closed if an exception is thrown in createSocket fixes Issue #2684 (#2685)
* fix: Make sure socket is closed if an exception is thrown in createSocket fixes Issue #2684
* catch exception in close and add to suppressed
* use .tmp instead of null appeases null check
* small style fixes