Lock TCP socket a little less
This commit is contained in:
@@ -344,8 +344,6 @@ xrt::drivers::wivrn::deserialization_packet xrt::drivers::wivrn::TCP::receive_ra
|
|||||||
|
|
||||||
void xrt::drivers::wivrn::TCP::send_raw(const std::vector<std::span<uint8_t>> & spans)
|
void xrt::drivers::wivrn::TCP::send_raw(const std::vector<std::span<uint8_t>> & spans)
|
||||||
{
|
{
|
||||||
std::lock_guard lock(*mutex);
|
|
||||||
|
|
||||||
std::vector<iovec> iovecs;
|
std::vector<iovec> iovecs;
|
||||||
|
|
||||||
uint16_t size = 0;
|
uint16_t size = 0;
|
||||||
@@ -366,6 +364,7 @@ void xrt::drivers::wivrn::TCP::send_raw(const std::vector<std::span<uint8_t>> &
|
|||||||
.msg_flags = 0,
|
.msg_flags = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::lock_guard lock(*mutex);
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
const auto & data = spans[0];
|
const auto & data = spans[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user