mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-04 03:03:51 +01:00
connectd: don't advertize websocket support if we have no other (non-Tor) addrs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b45544c659
commit
5284ee4dae
1 changed files with 7 additions and 3 deletions
|
@ -1420,9 +1420,13 @@ static struct wireaddr_internal *setup_listeners(const tal_t *ctx,
|
|||
* getinfo. */
|
||||
}
|
||||
|
||||
/* We add the websocket port to the announcement if it
|
||||
* applies to any */
|
||||
if (announced_some) {
|
||||
/* We add the websocket port to the announcement if we made one
|
||||
* *and* we have other announced addresses. */
|
||||
/* BOLT-websocket #7:
|
||||
* - MUST NOT add a `type 6` address unless there is also at
|
||||
* least one address of different type.
|
||||
*/
|
||||
if (announced_some && tal_count(*announcable) != 0) {
|
||||
wireaddr_from_websocket(&addr, daemon->websocket_port);
|
||||
add_announcable(announcable, &addr);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue