Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
5309-Handle-connection-errors-explicitly.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5309-Handle-connection-errors-explicitly.patch of Package erlang
From e8e967ed7e0e64a614bf8faecb521907e1e5d198 Mon Sep 17 00:00:00 2001 From: Benedikt Reinartz <filmor@gmail.com> Date: Tue, 17 Jan 2023 19:31:59 +0100 Subject: [PATCH 09/12] Handle connection errors explicitly --- lib/observer/src/observer.erl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/observer/src/observer.erl b/lib/observer/src/observer.erl index a130f9d494..05f3efcd7e 100644 --- a/lib/observer/src/observer.erl +++ b/lib/observer/src/observer.erl @@ -29,10 +29,18 @@ start(Node) when is_atom(Node) -> start([Node]); start([Node]) -> Node1 = to_atom(Node), - true = net_kernel:connect_node(Node1), - Res = observer_wx:start(), - observer_wx:set_node(Node1), - Res. + case net_kernel:connect_node(Node1) of + true -> + case observer_wx:start() of + ok -> + observer_wx:set_node(Node1), + ok; + Err -> + Err + end; + _ -> + {error, failed_to_connect} + end. start_and_wait() -> ok = start(), -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor