Erratum
This commit is contained in:
parent
2bea742a69
commit
c5929e8cb1
@ -6,6 +6,7 @@ using Microsoft.JSInterop;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
|
||||
namespace BlazorCanvas.Server.Components.Data;
|
||||
|
||||
@ -61,7 +62,7 @@ public class CanvasService {
|
||||
}
|
||||
}
|
||||
|
||||
public async void Init() {
|
||||
public async void InitStreamer() {
|
||||
while (!_is_init) {
|
||||
_is_init = await _redisService.InitStreamer();
|
||||
if (!_is_init)
|
||||
@ -101,10 +102,12 @@ public class CanvasService {
|
||||
|
||||
if (!_is_started) {
|
||||
if (!_is_init)
|
||||
Init();
|
||||
if (_is_init)
|
||||
InitStreamer();
|
||||
if (_is_init) {
|
||||
Consume();
|
||||
_is_started = true;
|
||||
_is_started = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (eventArgs.Buttons == 0 || eventArgs.Buttons > 2)
|
||||
@ -140,10 +143,6 @@ public class CanvasService {
|
||||
|
||||
_redisService.Produce(command); // Stream
|
||||
|
||||
// _redisService.Publish(command); // Pub/Sub
|
||||
|
||||
// Draw(command); // Local
|
||||
|
||||
_lastCommand = command;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user