generic_server: Remove unneeded static_pointer_cast<>

Now that do_accepts() is in generic_server, we can get rid of the
static_pointer_cast<>.
This commit is contained in:
Pekka Enberg
2021-03-04 13:24:33 +02:00
parent ac90a8ea50
commit f560b3daa3

View File

@@ -126,7 +126,7 @@ future<> server::do_accepts(int which, bool keepalive, socket_address server_add
_logger.info("exception while advertising new connection: {}", std::current_exception());
}
// Block while monitoring for lifetime/errors.
return static_pointer_cast<generic_server::connection>(conn)->process().finally([this, conn] {
return conn->process().finally([this, conn] {
return unadvertise_connection(conn);
}).handle_exception([this] (std::exception_ptr ep) {
if (is_broken_pipe_or_connection_reset(ep)) {