Previously, ScinServer created the ScinServerStatusPoller during init, and created its NetAddr while booting. This meant that unless you booted immediately, the status poller would error, trying to poll nil.
Additionally, if the server failed to boot, the status poller would remain in a state of booting.
This meant that it was impossible to boot after an error.
Implementation
This PR moves the creation of the NetAddr into the init method, ensuring it is available from the start.
Additionally, when the server fails to boot, the status poller is now notified that serverBooting is false.
With this PR, users can use the following style (as with SC audio server):
v = ScinServer();
v.options.width = 400;
v.options.height = 300;
v.boot;
And if it fails, options can be modified and boot called again:
v = ScinServer();
v.boot; // assume failed: no vulkan devices available
v.options.swiftshader = true;
v.boot; // ok
Purpose and motivation
Previously, ScinServer created the ScinServerStatusPoller during init, and created its NetAddr while booting. This meant that unless you booted immediately, the status poller would error, trying to poll
nil
.Additionally, if the server failed to boot, the status poller would remain in a state of booting. This meant that it was impossible to boot after an error.
Implementation
This PR moves the creation of the NetAddr into the init method, ensuring it is available from the start.
Additionally, when the server fails to boot, the status poller is now notified that serverBooting is false.
With this PR, users can use the following style (as with SC audio server):
And if it fails, options can be modified and boot called again:
Types of changes
Checklist