From bcafa10bd1edef31df4f232e8f7533552d7da9da Mon Sep 17 00:00:00 2001 From: Curve Date: Fri, 31 May 2024 00:10:41 +0200 Subject: [PATCH] refactor(patchbay): update global node on rebind --- CMakeLists.txt | 2 +- package.json | 2 +- src/patchbay.impl.cpp | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d48b770..a3b3f04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.21) -project(venmic LANGUAGES CXX VERSION 4.0.1) +project(venmic LANGUAGES CXX VERSION 4.0.2) # -------------------------------------------------------------------------------------------------------- # Library options diff --git a/package.json b/package.json index f4f0982..86e4d4a 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "private": false, "license": "MPL-2.0", "author": "Curve (https://github.com/Curve)", - "version": "4.0.1", + "version": "4.0.2", "main": "./lib/index.js", "types": "./lib/module.d.ts", "scripts": { diff --git a/src/patchbay.impl.cpp b/src/patchbay.impl.cpp index 603636a..02e22ca 100644 --- a/src/patchbay.impl.cpp +++ b/src/patchbay.impl.cpp @@ -577,11 +577,13 @@ namespace vencord } else { - const auto error = updated.error(); - logger::get()->warn(R"([patchbay] (receive) failed to rebind {}: "{}")", id, error.message); + logger::get()->warn(R"([patchbay] (receive) failed to rebind {}: "{}")", id, updated.error().message); } - return node{props}; + auto rtn = node{props}; + nodes[id].info.props = std::move(props); + + return rtn; }; logger::get()->trace("[patchbay] (receive): listing nodes ({{{}}})", fmt::join(req.props, ","));