Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TaoChenOSU committed Aug 17, 2023
1 parent feec0dd commit 78d6d94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const registerSignalREvents = (hubConnection: signalR.HubConnection, store: Stor
let hubConnection: signalR.HubConnection | undefined = undefined;

// This function will return the singleton instance of the SignalR connection
export const GetOrCreateHubConnection = (store: StoreMiddlewareAPI) => {
export const getOrCreateHubConnection = (store: StoreMiddlewareAPI) => {
if (hubConnection === undefined) {
hubConnection = setupSignalRConnectionToChatHub();

Expand Down
4 changes: 2 additions & 2 deletions webapp/src/redux/features/message-relay/signalRMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AlertType } from '../../../libs/models/AlertType';
import { addAlert } from '../app/appSlice';
import { IChatMessage } from './../../../libs/models/ChatMessage';
import { StoreMiddlewareAPI, getSelectedChatID } from './../../app/store';
import { GetOrCreateHubConnection } from './signalRHubConnection';
import { getOrCreateHubConnection } from './signalRHubConnection';

// The action sent to the SignalR middleware.
interface SignalRAction extends AnyAction {
Expand All @@ -23,7 +23,7 @@ export const signalRMiddleware = (store: StoreMiddlewareAPI) => {
const result = next(action);

// Get the SignalR connection instance
const hubConnection = GetOrCreateHubConnection(store);
const hubConnection = getOrCreateHubConnection(store);

// The following actions will be captured by the SignalR middleware and broadcasted to all clients.
switch (action.type) {
Expand Down

0 comments on commit 78d6d94

Please sign in to comment.