Updated websocket ts code
ws factory now creates new object on each invocation instead of reusing
This commit is contained in:
parent
00a01bc81b
commit
e4041f9e41
@ -24,14 +24,12 @@ import { ActiveUserViewModel } from "./viewmodel/ActiveUserViewModel";
|
||||
|
||||
// log.setLevel("TRACE");
|
||||
|
||||
const chatSocket = new SockJS("/chat");
|
||||
const chatStompClient = new Client();
|
||||
chatStompClient.webSocketFactory = () => chatSocket;
|
||||
chatStompClient.webSocketFactory = () => new SockJS("/chat");
|
||||
chatStompClient.activate();
|
||||
|
||||
const pingSocket = new SockJS("/ping");
|
||||
const pingStompClient = new Client();
|
||||
pingStompClient.webSocketFactory = () => pingSocket;
|
||||
pingStompClient.webSocketFactory = () => new SockJS("/ping");
|
||||
pingStompClient.activate();
|
||||
|
||||
pingStompClient.onConnect = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user