This commit is contained in:
Nathan Bierema 2022-06-12 21:32:17 -04:00
parent 1d0e096e27
commit 2155ec7654
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ let socket: AGClientSocket;
let store: MiddlewareAPI<Dispatch<StoreAction>, StoreState>;
function emit({ message: type, id, instanceId, action, state }: EmitAction) {
socket.transmit(id ? `sc-${id}` : 'respond', {
void socket.transmit(id ? `sc-${id}` : 'respond', {
type,
action,
state,
@ -125,7 +125,7 @@ function monitoring(request: MonitoringRequest) {
instanceId === instances.selected &&
(request.type === 'ACTION' || request.type === 'STATE')
) {
socket.transmit('respond', {
void socket.transmit('respond', {
type: 'SYNC',
state: stringify(instances.states[instanceId]),
id: request.id,
@ -191,7 +191,7 @@ function handleConnection() {
})();
void (async () => {
for await (const data of socket.listener('unsubscribe')) {
socket.unsubscribe(data.channel);
void socket.unsubscribe(data.channel);
store.dispatch({ type: actions.UNSUBSCRIBE, channel: data.channel });
}
})();

View File

@ -132,7 +132,7 @@ export default function (argv: { [arg: string]: any }): Promise<{
}
})();
void (async () => {
for await (const data of socket.receiver('disconnect')) {
for await (const data of socket.listener('disconnect')) {
const channel = agServer.exchange.channel('sc-' + socket.id);
channel.unsubscribe();
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion