0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

ircd::net: Close the sd in dc handler unconditionally; align the peek buf.

This commit is contained in:
Jason Volk 2018-01-11 03:23:40 -08:00
parent fcfa386e33
commit 382d1b0bf3

View file

@ -1400,7 +1400,7 @@ ircd::net::socket::wait(const wait_opts &opts,
// except when it's canceled. Something here smells off.
case ready::READ:
{
static char buf[1];
static char buf[1] alignas(16);
static const asio::mutable_buffers_1 bufs{buf, sizeof(buf)};
sd.async_receive(bufs, sd.message_peek, std::move(handle));
//sd.async_wait(wait_type::wait_read, std::move(handle));
@ -1655,9 +1655,7 @@ noexcept try
if(!timedout)
cancel_timeout();
if(unlikely(sd.is_open()))
sd.close();
sd.close();
call_user(callback, ec);
}
catch(const boost::system::system_error &e)