Skip to content

Commit

Permalink
Merge pull request #11 from antlad/total_size_fix
Browse files Browse the repository at this point in the history
Total size fix
  • Loading branch information
antlad authored Mar 16, 2021
2 parents 49675a6 + 51708f9 commit 732f2ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions config_conan.sh

This file was deleted.

4 changes: 2 additions & 2 deletions impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ status connection<SocketType>::publish(string_view subject, const char* raw, std
buffers.emplace_back(boost::asio::buffer(header.data(), header.size()));
buffers.emplace_back(boost::asio::buffer(raw, n));
buffers.emplace_back(boost::asio::buffer("\r\n", 2));
std::size_t total_size = header.size() + n + 4;
std::size_t total_size = header.size() + n + 2;
m_socket.async_write(buffers, boost::asio::transfer_exactly(total_size), c[ec]);
return handle_error(c);
}
Expand All @@ -442,7 +442,7 @@ template <class SocketType> status connection<SocketType>::unsubscribe(const isu
return status(fmt::format("subscription not found {}", sid));
}
m_subs.erase(it);

std::string unsub_payload(fmt::format("UNSUB {}\r\n", sid));
m_socket.async_write(boost::asio::buffer(unsub_payload), boost::asio::transfer_exactly(unsub_payload.size()),
c[ec]);
Expand Down

0 comments on commit 732f2ff

Please # to comment.