Skip to content

Commit

Permalink
Closes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
antlad committed Mar 16, 2021
1 parent 172db39 commit 51708f9
Showing 1 changed file with 2 additions and 2 deletions.
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 51708f9

Please # to comment.