HelloZeroNet / HelloZeroNet/ZeroNet

Second instance will continue running even if port is already taken

Aperta
#2,065 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
JavaScript
Stelle
18.8k
Fork
2.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.