HelloZeroNet / HelloZeroNet/ZeroNet

Second instance will continue running even if port is already taken

Ouverte
#2,065 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
JavaScript
Étoiles
18.8k
Forks
2.3k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Describe your environment

* ZeroNet version: 0.7.0
* Operating system: Windows 10

* First instance: `C:\Users\filips\AppData\Local\Programs\ZeroNet`
* Second instance: `D:\Users\filips\Namizje\ZeroNet-win-dist-win64`

### Describe the problem

#### Steps to reproduce

1. Create first ZeroNet instance.
2. Confirm that it works.
3. Create a second ZeroNet instance with the same port.
4. It will continue running even if the port is already taken.

#### Observed results

The second instance will try to start. It will fail because the port for a server is already taken by the first instance.

But for some reason, the process of the second instance won't be killed so it will be still running, but without any usability.

When you will try to open the server of the second instance, it will actually use the first one.

[Here](https://pastebin.com/Vgz9xR64) is my debug log of the second instance. As you can see, it will detect that port is already taken and stop UiServer. But the process will be still running until I manually kill it from Task Manager.

This issue is mostly based on [this Reddit topic](https://www.reddit.com/r/zeronet/comments/c045z2/disallow_running_a_second_instance/).

#### Expected results

The second instance should detect that port is already taken, inform the user and then stop itself.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Reproduce on Windows 10 by starting two ZeroNet instances with the same server port, then review the linked debug log for the second instance. Confirm that the port conflict is reported and that UiServer stops, while the process remains alive. Done means the second instance informs the user and exits instead of continuing to run.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Domaine
backend, networking
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.