Skip to content

Commit

Permalink
bus/driver: handle quotas for driver unicasts
Browse files Browse the repository at this point in the history
The bus driver only ever sends solicited unicasts. They're either
replies or solicited directed signals (NameAcquired, NameLost). Hence,
all unicast-quota-failures must result in a client shutdown.

Signed-off-by: David Herrmann <[email protected]>
  • Loading branch information
David Herrmann committed Feb 21, 2018
1 parent d1b8143 commit d9d9639
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/bus/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,13 @@ static int driver_send_unicast(Peer *receiver, Message *message) {
if (r)
return error_fold(r);

/* XXX: handle quota */
r = connection_queue(&receiver->connection, NULL, message);
if (r)
return error_fold(r);
if (r) {
if (r != CONNECTION_E_QUOTA)
return error_fold(r);

connection_shutdown(&receiver->connection);
}

return 0;
}
Expand Down

0 comments on commit d9d9639

Please sign in to comment.