close client before returning

This commit is contained in:
Theis Pieter Hollebeek 2024-12-12 10:43:37 +01:00
parent 2d4879b69f
commit cf84770d90

View File

@ -126,7 +126,6 @@ public:
if (err < 0) {
return Err { .msg = std::format("could not bind ({})", err) };
};
return Unit {};
}
{
auto err = ::listen(socket, 0);
@ -168,6 +167,7 @@ public:
auto msg = std::format(
"error parsing rpc message: '{}' @ {}:{}\n",
err.msg, err.pos.line, err.pos.col);
close(client);
return Err {
.msg = msg,
};