Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix some server boot issues #97

Merged
merged 2 commits into from
Apr 30, 2020

Conversation

jrsurge
Copy link
Contributor

@jrsurge jrsurge commented Apr 30, 2020

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):

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

Types of changes

  • Bug fix
  • Enhancement

Checklist

  • This PR is ready for review

@lnihlen lnihlen merged commit aa7ec68 into ScintillatorSynth:master Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants