Skip to content

Commit abe5f88

Browse files
committed
Merge branch 'kuba/ssh/fix_connection_info_spec/ERIERL-1165/OTP-19388' into maint
* kuba/ssh/fix_connection_info_spec/ERIERL-1165/OTP-19388: ssh: fix connection_info result typespec
2 parents f560500 + 6a697db commit abe5f88

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/ssh/src/ssh.erl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,23 +464,25 @@ default values.
464464
| {options, client_options()}
465465
| {algorithms, conn_info_algs()}
466466
| {channels, conn_info_channels()}.
467-
467+
468468
-doc(#{equiv => connection_info/2}).
469469
-doc(#{since => <<"OTP 22.1">>}).
470-
-spec connection_info(ConnectionRef) -> InfoTupleList when
470+
-spec connection_info(ConnectionRef) ->
471+
InfoTupleList | {error, term()} when
471472
ConnectionRef :: connection_ref(),
472473
InfoTupleList :: [InfoTuple],
473474
InfoTuple :: connection_info_tuple().
474475

475-
connection_info(ConnectionRef) ->
476+
connection_info(ConnectionRef) ->
476477
connection_info(ConnectionRef, []).
477478

478479
-doc """
479480
Returns information about a connection intended for e.g debugging or logging.
480481

481482
When the `Key` is a single `Item`, the result is a single `InfoTuple`
482483
""".
483-
-spec connection_info(ConnectionRef, ItemList|Item) -> InfoTupleList|InfoTuple when
484+
-spec connection_info(ConnectionRef, ItemList|Item) ->
485+
InfoTupleList | InfoTuple | {error, term()} when
484486
ConnectionRef :: connection_ref(),
485487
ItemList :: [Item],
486488
Item :: client_version | server_version | user | peer | sockname | options | algorithms | sockname,

0 commit comments

Comments
 (0)