ami-iit / yarp-openmct

Repo for YARP and OpenMCT integration.
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Avoid double SIGINT on openmctStaticServer process #46

Closed nunoguedelha closed 3 years ago

nunoguedelha commented 3 years ago

Fixes #44 .

nunoguedelha commented 3 years ago

Testing the PR

Before the fix, when hitting <CTRL+C> after launching the application and opening http://localhost:8080 in the browser, we got...

^CReceived SIGINT ...
{ status: 'WRPLY',
  message: 'Process (PID 37659) OpenMCT Server stopping (signal SIGINT) ...' }

[OPEN-MCT STATIC SERVER] close: null, signal: SIGINT

After the fix, we get the expected output...

^CReceived SIGINT ...
{ status: 'WRPLY',
  message: 'Process (PID 38921) OpenMCT Server stopping (signal SIGINT) ...' }
[OPEN-MCT STATIC SERVER] stdout: Received SIGINT ...
Open-MCT Visualizer Server closed. No further requests accepted. Refreshing the visualizer web page will fail.
CLOSE CONNECTION
CLOSE CONNECTION
CLOSE CONNECTION
CLOSE CONNECTION
CLOSE CONNECTION
CLOSE CONNECTION

[OPEN-MCT STATIC SERVER] close: 130, signal: null
nunoguedelha commented 3 years ago

Thanks @S-Dafarra !