HelloZeroNet / HelloZeroNet/ZeroNet

Second instance will continue running even if port is already taken

Abierto
#2,065 4 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
JavaScript
Estrellas
18.8k
Forks
2.3k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.