logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Implementing Restart Delay

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
MagnumMan



Joined: 01 Apr 2005
Posts: 8
Location: MA

PostPosted: Tue Apr 12, 2005 3:08    Post subject: Implementing Restart Delay Reply with quote

I browsed through the code and it appears that the restart delay really isn't hooked up at all, so I hooked it up:

NWNX2Dlg.cpp:169 insert (after setInterval):
watchdogProcess->setDelay(m_intRestartDelay * 1000);

watchdog.h:35 insert (in the struct):
int delay;

watchdog.h:45 insert (after setInternal):
setDelay(0);

watchdogprocess.cpp:33 insert (in the struct):
int delay;

watchdogprocess.cpp:59 insert (before StartAndInject):
Sleep(pWatchdogThreadData->delay);

I'm not sure what the use of this is really for; perhaps to give Dr. Watson enough time to grab a crash dump before restarting?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
DarkstarsDad



Joined: 17 Jan 2005
Posts: 59
Location: Overland Park, Kansas USA

PostPosted: Tue Apr 12, 2005 5:03    Post subject: reason Reply with quote

yes and some people needed a delay to allow the DB to startup and init.
_________________
Just because you think you can't. Is the best reason to try it anyway.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Apr 16, 2005 1:00    Post subject: Reply with quote

Sometimes the server is restarted to soon and the port (e.g. 5121) is still occupied by the crashed instance. That is what the delay parameter is for.

The executable actually honors the delay, I just seem to have forgotten to update the source files in the zip file. It will be included in the next version, thanks for the info.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group