openEQUELLA
openEQUELLA copied to clipboard
Potential connection leak
Describe the bug In RunWithDB.scala there is code that attempts to commit or rollback a transaction but does not catch any exceptions, so the close call could be missed. It doesn't seem to be causing any issues at the moment, but could potentially.
val connection = ds.getConnection()
jdbc.runA(connection).attempt.unsafeRunSync() match {
case Left(e) => connection.rollback(); connection.close(); throw e
case Right(v) => connection.commit(); connection.close(); v
}
Platform:
- OpenEquella Version: 6.6+