summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-01-11 16:31:10 +0000
committerAndreas Kling <kling@serenityos.org>2023-01-12 11:25:51 +0100
commita8cf0c9371f7ba500cc4920889bc06d78623e980 (patch)
treee6ac140bb2b697d69417e9ff944576350671a94a /Userland/Services
parenta15d44f019dc60b001c565ce0b940cc87024dbfd (diff)
downloadserenity-a8cf0c9371f7ba500cc4920889bc06d78623e980.zip
LibCore+Userland: Make Core::Timer::create_single_shot() return ErrorOr
clang-format sure has some interesting opinions about where to put a method call that comes after a lambda. :thonk:
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/AudioServer/Mixer.cpp3
-rw-r--r--Userland/Services/ConfigServer/ConnectionFromClient.cpp2
-rw-r--r--Userland/Services/DHCPClient/DHCPv4Client.cpp6
-rw-r--r--Userland/Services/RequestServer/ConnectionCache.h2
-rw-r--r--Userland/Services/WindowServer/Compositor.cpp9
-rw-r--r--Userland/Services/WindowServer/ConnectionFromClient.cpp4
6 files changed, 16 insertions, 10 deletions
diff --git a/Userland/Services/AudioServer/Mixer.cpp b/Userland/Services/AudioServer/Mixer.cpp
index 5cfbd64890..a865e5012d 100644
--- a/Userland/Services/AudioServer/Mixer.cpp
+++ b/Userland/Services/AudioServer/Mixer.cpp
@@ -177,7 +177,8 @@ void Mixer::request_setting_sync()
if (auto result = m_config->sync(); result.is_error())
dbgln("Failed to write audio mixer config: {}", result.error());
},
- this);
+ this)
+ .release_value_but_fixme_should_propagate_errors();
m_config_write_timer->start();
}
}
diff --git a/Userland/Services/ConfigServer/ConnectionFromClient.cpp b/Userland/Services/ConfigServer/ConnectionFromClient.cpp
index 1e3c77b6f7..3daf7faa15 100644
--- a/Userland/Services/ConfigServer/ConnectionFromClient.cpp
+++ b/Userland/Services/ConfigServer/ConnectionFromClient.cpp
@@ -76,7 +76,7 @@ static Core::ConfigFile& ensure_domain_config(DeprecatedString const& domain)
ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket> client_socket, int client_id)
: IPC::ConnectionFromClient<ConfigClientEndpoint, ConfigServerEndpoint>(*this, move(client_socket), client_id)
- , m_sync_timer(Core::Timer::create_single_shot(s_disk_sync_delay_ms, [this]() { sync_dirty_domains_to_disk(); }))
+ , m_sync_timer(Core::Timer::create_single_shot(s_disk_sync_delay_ms, [this]() { sync_dirty_domains_to_disk(); }).release_value_but_fixme_should_propagate_errors())
{
s_connections.set(client_id, *this);
}
diff --git a/Userland/Services/DHCPClient/DHCPv4Client.cpp b/Userland/Services/DHCPClient/DHCPv4Client.cpp
index 20f3c89f99..bb8c16ed81 100644
--- a/Userland/Services/DHCPClient/DHCPv4Client.cpp
+++ b/Userland/Services/DHCPClient/DHCPv4Client.cpp
@@ -261,7 +261,8 @@ void DHCPv4Client::handle_ack(DHCPv4Packet const& packet, ParsedDHCPv4Options co
transaction->has_ip = false;
dhcp_discover(interface);
},
- this);
+ this)
+ .release_value_but_fixme_should_propagate_errors();
Optional<IPv4Address> gateway;
if (auto routers = options.get_many<IPv4Address>(DHCPOption::Router, 1); !routers.is_empty())
@@ -288,7 +289,8 @@ void DHCPv4Client::handle_nak(DHCPv4Packet const& packet, ParsedDHCPv4Options co
[this, iface = InterfaceDescriptor { iface }] {
dhcp_discover(iface);
},
- this);
+ this)
+ .release_value_but_fixme_should_propagate_errors();
}
void DHCPv4Client::process_incoming(DHCPv4Packet const& packet)
diff --git a/Userland/Services/RequestServer/ConnectionCache.h b/Userland/Services/RequestServer/ConnectionCache.h
index df88591d31..8cdb0b3f18 100644
--- a/Userland/Services/RequestServer/ConnectionCache.h
+++ b/Userland/Services/RequestServer/ConnectionCache.h
@@ -203,7 +203,7 @@ decltype(auto) get_or_create_connection(auto& cache, URL const& url, auto& job,
sockets_for_url.append(make<ConnectionType>(
socket_result.release_value(),
typename ConnectionType::QueueType {},
- Core::Timer::create_single_shot(ConnectionKeepAliveTimeMilliseconds, nullptr)));
+ Core::Timer::create_single_shot(ConnectionKeepAliveTimeMilliseconds, nullptr).release_value_but_fixme_should_propagate_errors()));
sockets_for_url.last().proxy = move(proxy);
did_add_new_connection = true;
}
diff --git a/Userland/Services/WindowServer/Compositor.cpp b/Userland/Services/WindowServer/Compositor.cpp
index 7f32f02c62..cbc49093f2 100644
--- a/Userland/Services/WindowServer/Compositor.cpp
+++ b/Userland/Services/WindowServer/Compositor.cpp
@@ -55,14 +55,16 @@ Compositor::Compositor()
[this] {
compose();
},
- this);
+ this)
+ .release_value_but_fixme_should_propagate_errors();
m_immediate_compose_timer = Core::Timer::create_single_shot(
0,
[this] {
compose();
},
- this);
+ this)
+ .release_value_but_fixme_should_propagate_errors();
init_bitmaps();
}
@@ -1589,7 +1591,8 @@ void Compositor::start_window_stack_switch_overlay_timer()
[this] {
remove_window_stack_switch_overlays();
},
- this);
+ this)
+ .release_value_but_fixme_should_propagate_errors();
m_stack_switch_overlay_timer->start();
}
diff --git a/Userland/Services/WindowServer/ConnectionFromClient.cpp b/Userland/Services/WindowServer/ConnectionFromClient.cpp
index b1207eb4e6..213090ceb0 100644
--- a/Userland/Services/WindowServer/ConnectionFromClient.cpp
+++ b/Userland/Services/WindowServer/ConnectionFromClient.cpp
@@ -240,7 +240,7 @@ void ConnectionFromClient::flash_menubar_menu(i32 window_id, i32 menu_id)
return;
weak_window->menubar().flash_menu(nullptr);
weak_window->frame().invalidate_menubar();
- });
+ }).release_value_but_fixme_should_propagate_errors();
m_flashed_menu_timer->start();
} else if (m_flashed_menu_timer) {
m_flashed_menu_timer->restart();
@@ -1134,7 +1134,7 @@ void ConnectionFromClient::may_have_become_unresponsive()
async_ping();
m_ping_timer = Core::Timer::create_single_shot(1000, [this] {
set_unresponsive(true);
- });
+ }).release_value_but_fixme_should_propagate_errors();
m_ping_timer->start();
}