How do you use the application?
If you are having `server == null` it seems that you run the .exe once to start the server, then you run the same .exe for the second time to stop the server?
This will not work of course. You have to invoke the Stop() method on the instance from the first run (the instance used to Start() the server).
If this is your case, you have to add a process synchronization functionality into your application (such as global Mutex, global EventWaitHandle, named Pipe, Memory-mapped File, TCP/IP socket) or pull the syslog_state from DB periodically and react to its changes.
If this is not your case, update your application to keep reference to started server (do not set server = null).