0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 23:14:13 +01:00

ircd::client: Remove the asynchronous longpoll state.

This commit is contained in:
Jason Volk 2018-04-20 19:54:18 -07:00
parent 784293e01f
commit 6b32da764d
3 changed files with 2 additions and 15 deletions

View file

@ -50,7 +50,6 @@ struct ircd::client
size_t head_length {0};
size_t content_consumed {0};
resource::request request;
bool longpoll {false};
size_t write_all(const const_buffer &);
void close(const net::close_opts &, net::close_callback);

View file

@ -325,9 +325,9 @@ ircd::client::async()
assert(bool(this->sock));
assert(bool(this->conf));
auto &sock(*this->sock);
const auto timeout
const auto &timeout
{
longpoll? seconds(-1) : conf->async_timeout
conf->async_timeout
};
const net::wait_opts opts
@ -359,9 +359,6 @@ ircd::handle_client_ready(std::shared_ptr<client> client,
if(!handle_ec(*client, ec))
return;
if(client->longpoll)
return;
auto handler
{
std::bind(ircd::handle_client_request, std::move(client))
@ -618,9 +615,6 @@ noexcept try
if(!handle_request(pc))
return false;
if(longpoll)
return true;
// After the request, the head and content has been read off the socket
// and the capstan has advanced to the end of the content. The catch is
// that reading off the socket could have read too much, bleeding into
@ -896,9 +890,6 @@ ircd::client::discard_unconsumed(const http::request::head &head)
if(unlikely(!sock))
return;
if(longpoll)
return;
const size_t unconsumed
{
head.content_length - content_consumed

View file

@ -1580,9 +1580,6 @@ console_cmd__client(opt &out, const string_view &line)
else
out << " ASYNC";
if(client->longpoll)
out << " POLL";
if(client->request.user_id)
out << " USER " << client->request.user_id;