Page MenuHomePhabricator

[services] Tunnelbroker - Skipping sending notif token request when notifications are off by the config flag
ClosedPublic

Authored by max on Feb 23 2023, 5:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 9:18 PM
Unknown Object (File)
Sun, Apr 21, 9:18 PM
Unknown Object (File)
Sun, Apr 21, 9:18 PM
Unknown Object (File)
Sun, Apr 21, 9:16 PM
Unknown Object (File)
Fri, Apr 5, 4:54 PM
Unknown Object (File)
Mar 1 2024, 8:32 AM
Unknown Object (File)
Mar 1 2024, 8:32 AM
Unknown Object (File)
Mar 1 2024, 8:31 AM
Subscribers

Details

Summary

This diff skipping sending new notif token requests to the bidirectional stream when the notifications are off by the notifications.disable config flag parameter. We don't need to send this message to the stream and should skip checking the existing notification token in this case.

Linear task: ENG-2639

Test Plan
  1. Add the following config parameter to the tunnelbroker.ini file:
[notifications]
disable = true
  1. Connect to the Tunnelbroker's message stream.
  2. The expected result should be no newNotifyTokenRequired message in any case.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max published this revision for review.Feb 23 2023, 6:11 AM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added a reviewer: bartek.
bartek added inline comments.
services/tunnelbroker/src/server/mod.rs
189–192 ↗(On Diff #22993)

Still nitpicking about readability, but up to you ;)

This revision is now accepted and ready to land.Feb 23 2023, 6:20 AM
max added inline comments.
services/tunnelbroker/src/server/mod.rs
189–192 ↗(On Diff #22993)

Still nitpicking about readability, but up to you ;)

I would prefer to not create an additional variable here, thanks for commenting ;)