Update dependencies (#2729)

This updates Dendrite dependencies.
This commit is contained in:
Neil Alexander 2022-09-20 15:01:19 +01:00 committed by GitHub
parent 201ac05943
commit bd39748b5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 131 additions and 143 deletions

View file

@ -27,8 +27,6 @@ func IsUniqueConstraintViolationErr(err error) bool {
switch e := err.(type) {
case *pq.Error:
return e.Code == "23505"
case pq.Error:
return e.Code == "23505"
case *sqlite3.Error:
return e.Code == sqlite3.ErrConstraint
case sqlite3.Error:

View file

@ -57,7 +57,7 @@ func (w *ExclusiveWriter) Do(db *sql.DB, txn *sql.Tx, f func(txn *sql.Tx) error)
// opened using the database object from the task and then this will
// be passed as a parameter to the task function.
func (w *ExclusiveWriter) run() {
if !w.running.CAS(false, true) {
if !w.running.CompareAndSwap(false, true) {
return
}
if tracingEnabled {