We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd9306d commit e32826dCopy full SHA for e32826d
src/main/java/org/myrobotlab/service/NeoPixel.java
@@ -177,9 +177,13 @@ public void run() {
177
178
// FIXME - this should just wait/notify - not start a thread
179
public synchronized void start() {
180
- running = false;
181
- thread = new Thread(this, String.format("%s-animation-runner", getName()));
182
- thread.start();
+ if (thread == null) {
+ running = true;
+ thread = new Thread(this, String.format("%s-animation-runner", getName()));
183
+ thread.start();
184
+ } else {
185
+ log.info("animation runner already running");
186
+ }
187
}
188
189
public synchronized void stop() {
0 commit comments