mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 21:59:54 +01:00
Allow pending contact state update not to affect any rows.
This commit is contained in:
@@ -3291,7 +3291,7 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
ps.setInt(1, state.getValue());
|
ps.setInt(1, state.getValue());
|
||||||
ps.setBytes(2, p.getBytes());
|
ps.setBytes(2, p.getBytes());
|
||||||
int affected = ps.executeUpdate();
|
int affected = ps.executeUpdate();
|
||||||
if (affected != 1) throw new DbStateException();
|
if (affected < 0 || affected > 1) throw new DbStateException();
|
||||||
ps.close();
|
ps.close();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
tryToClose(ps, LOG, WARNING);
|
tryToClose(ps, LOG, WARNING);
|
||||||
|
|||||||
Reference in New Issue
Block a user