Skip to content

Commit

Permalink
Merge pull request #1147 from sodface/CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelherger authored Aug 18, 2024
2 parents aa6b64e + d0fdc03 commit bf91b01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Slim/Web/Cometd.pm
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ sub handler {
elsif ( $obj->{channel} eq '/meta/handshake' ) {
$clid = Slim::Utils::Misc::createUUID();
$manager->add_client( $clid );
if ( $isCLI ) {
$manager->register_connection( $clid, $conn );
}
}
elsif ( $obj->{channel} =~ m{^/slim/(?:subscribe|request)} && $obj->{data} ) {
# Pull clientId out of response channel
Expand Down
2 changes: 1 addition & 1 deletion Slim/Web/Cometd/Manager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ sub clid_for_connection {
my $result;

while ( my ($clid, $c) = each %{ $self->{conn} } ) {
if ( $conn eq $c ) {
if ( $conn eq $c->[0] ) {
$result = $clid;
}
}
Expand Down

0 comments on commit bf91b01

Please sign in to comment.