File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
driver/src/main/java/org/neo4j/driver/internal Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,14 @@ public void close()
125125 // Best-effort
126126 }
127127 }
128- connection .sync ();
129- connection .close ();
128+ try
129+ {
130+ connection .sync ();
131+ }
132+ finally
133+ {
134+ connection .close ();
135+ }
130136 }
131137 }
132138
Original file line number Diff line number Diff line change 4747 * is full or the pool is being cleaned on driver.close, then we directly close the connection attached with the
4848 * session.
4949 *
50- * The session is NOT meat to be thread safe, each thread should have an independent session and close it (return to
50+ * The session is NOT meant to be thread safe, each thread should have an independent session and close it (return to
5151 * pool) when the work with the session has been done.
5252 *
5353 * The driver is thread safe. Each thread could try to get a session from the pool and then return it to the pool
You can’t perform that action at this time.
0 commit comments