diff --git a/src/common/datomish/transact.cljc b/src/common/datomish/transact.cljc index bc62ff05..68da51dc 100644 --- a/src/common/datomish/transact.cljc +++ b/src/common/datomish/transact.cljc @@ -586,7 +586,7 @@ (go (>! token-chan (gensym "transactor-token")) (loop [] - (let [token ( (! (:listener-source conn) report) + (when report + ;; ! (:listener-source conn) report)) report)))] + ;; Even when report is nil (transaction not committed), pair is non-nil. (>! result pair)) (>! token-chan token) (when close? diff --git a/test/datomish/transact_test.cljc b/test/datomish/transact_test.cljc index 1436eea9..34970f8b 100644 --- a/test/datomish/transact_test.cljc +++ b/test/datomish/transact_test.cljc @@ -209,4 +209,16 @@ (tempids r))) (is (= nil (a/poll! lc))))))) +(deftest-db test-failing-transacts conn + (let [{tx0 :tx} (