Skip to content
Snippets Groups Projects
Unverified Commit 16ac73d0 authored by akwizgran's avatar akwizgran
Browse files

Don't throw an exception if the client has no delivery hook.

parent cc439aa7
No related branches found
No related tags found
No related merge requests found
...@@ -339,9 +339,9 @@ class ValidationManagerImpl implements ValidationManager, Service, ...@@ -339,9 +339,9 @@ class ValidationManagerImpl implements ValidationManager, Service,
private boolean deliverMessage(Transaction txn, Message m, ClientId c, private boolean deliverMessage(Transaction txn, Message m, ClientId c,
Metadata meta) throws DbException { Metadata meta) throws DbException {
// Deliver the message to the client if it's registered a hook
IncomingMessageHook hook = hooks.get(c); IncomingMessageHook hook = hooks.get(c);
if (hook == null) throw new DbException(); if (hook != null) hook.incomingMessage(txn, m, meta);
hook.incomingMessage(txn, m, meta);
// TODO: Find a better way for clients to signal validity, #643 // TODO: Find a better way for clients to signal validity, #643
if (db.getRawMessage(txn, m.getId()) == null) { if (db.getRawMessage(txn, m.getId()) == null) {
db.setMessageState(txn, m.getId(), INVALID); db.setMessageState(txn, m.getId(), INVALID);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment