Skip to content

SIGINT handler for Linux headless server does not unregister #2555

@pljones

Description

@pljones

Describe the bug
Stopping the headless Server should unregister from any Directory with which it is registered. If this is not done, a "ghost entry" remains in the directory list (visible when a client runs with --showallservers or in Jamulus Explorer).

Current behaviour is that the headless Server does not unregister.

To Reproduce

git checkout master
git pull upstream master
make distclean; qmake && make -j3
./Jamulus -s -n -p <openport> -e <Directory server address>
(check the server is visible and operational)

image
And this shows the log for Jamulus Explorer successfully retrieving the welcome message:

 *** Copyright (C) 2005-2022 The Jamulus Development Team

Server Registration Status update: Registration requested
Server Registration Status update: Registered
2022-03-27 12:44:37, 80.85.86.7, connected (1)
2022-03-27 12:44:37,, server idling -------------------------------------

Now shut down the server with Ctrl-C:

^COnHandledSignal: 2

The signal is handled but the Server doesn't send an unregister request, leaving a ghost entry:
image
Note the "Ping", "Version" and "OS" are not now listed.

Expected behavior
Stopping the headless server should send an unregister request. This does happen when using the UI:

Server:

./Jamulus -s -p <openport> -e <Directory server address>
...
Server Registration Status update: Registration requested
Server Registration Status update: Registered
...
Server Registration Status update: Not registered

Directory:

Mar 27 12:51:34 fs-peter Jamulus-Directory2[646838]: Requested to register entry for 192.168.1.19:56850 (81.174.155.168:56850): (private)drealm.info
...
Mar 27 12:52:45 fs-peter Jamulus-Directory2[646838]: Requested to unregister entry for 192.168.1.19:56850

Operating system
Tested on Linux.

Version of Jamulus
56092960

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions