From 7806b64783f2f398676f98269bbfe5289db2c823 Mon Sep 17 00:00:00 2001 From: Theis Pieter Hollebeek Date: Thu, 21 Nov 2024 11:38:44 +0100 Subject: [PATCH] writer as unique ptr --- runtime/rpc_server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/rpc_server.cpp b/runtime/rpc_server.cpp index 6fedf84..5b1fe0b 100644 --- a/runtime/rpc_server.cpp +++ b/runtime/rpc_server.cpp @@ -1,5 +1,6 @@ #include "rpc_server.hpp" #include "json.hpp" +#include #include #include #include @@ -57,7 +58,7 @@ auto slige_rpc::RpcServer::listen() -> Res continue; } auto req = sliger::json::parse_json(message); - auto writer = BufferedWriter(client); + auto writer = std::make_unique(client); this->functor(req, std::move(writer)); message.clear(); break;