Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Restart after Server Error#26

JMarstrell started this conversation inGeneral
Jan 29, 2023· 1 comments· 2 replies
Discussion options

Is there a way to restart the server after an error without closing and restarting my c# application? If not, is there any other way to recover from a ZWaveJS.NET server error?

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

Hi@JMarstrell

I do believe I implemented aDestroy() method on the Driver class.

Using this will bring it down, and you will need to fire up a new instance of this class to start over.
Its advisable to check any zombie processes after this - but i'm pretty sure they are terminated.

I need to bring this package up to the latest API level, so any input is welcome

You must be logged in to vote
2 replies
@JMarstrell
Comment options

The driver does go through the destroy process. Any attempt to destroy it again after fatal error gives an error.

If I try to create another instance of the driver after a fatal error the server doesn’t fully complete its startup. Not sure if the port 50001 is being released or not. I have been trying to find a way to check.

Thinking about it, the server my be running from a previous crash and an attempt to start the driver again works momentarily and then causes the fatal error. Is there a way to check and stop it or reconnect?

@marcus-j-davies
Comment options

Could you provide me a stack trace of a fatal error?

A fatal error should only occur during driver start up.

process.stderr.write("1\n");

These are handled later here, where a fatal error event is emitted for the frontend app to restart everything (but not before callingDestroy)

TheTerminate method (in theDestroy block) actually sends a message to the runtime, to destroy its own self

if(Data.toString().trim()==="KILL"){

You could go for broke and kill the image

Process.GetProcessesByName("Server.psi").kill()

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@JMarstrell@marcus-j-davies

[8]ページ先頭

©2009-2025 Movatter.jp