From 98ce7f692788278b127e972e271c7802fe754b3c Mon Sep 17 00:00:00 2001 From: Jakub Witczak Date: Mon, 9 Dec 2024 12:24:54 +0100 Subject: [PATCH] ssh: fix connection_info result typespec --- lib/ssh/src/ssh.erl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl index f856d3d88787..d320b576c21d 100644 --- a/lib/ssh/src/ssh.erl +++ b/lib/ssh/src/ssh.erl @@ -287,16 +287,18 @@ close(ConnectionRef) -> | {options, client_options()} | {algorithms, conn_info_algs()} | {channels, conn_info_channels()}. - --spec connection_info(ConnectionRef) -> InfoTupleList when + +-spec connection_info(ConnectionRef) -> + InfoTupleList | {error, term()} when ConnectionRef :: connection_ref(), InfoTupleList :: [InfoTuple], InfoTuple :: connection_info_tuple(). -connection_info(ConnectionRef) -> +connection_info(ConnectionRef) -> connection_info(ConnectionRef, []). --spec connection_info(ConnectionRef, ItemList|Item) -> InfoTupleList|InfoTuple when +-spec connection_info(ConnectionRef, ItemList|Item) -> + InfoTupleList | InfoTuple | {error, term()} when ConnectionRef :: connection_ref(), ItemList :: [Item], Item :: client_version | server_version | user | peer | sockname | options | algorithms | sockname,