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");
|
// log.setLevel("TRACE");
|
||||||
|
|
||||||
const chatSocket = new SockJS("/chat");
|
|
||||||
const chatStompClient = new Client();
|
const chatStompClient = new Client();
|
||||||
chatStompClient.webSocketFactory = () => chatSocket;
|
chatStompClient.webSocketFactory = () => new SockJS("/chat");
|
||||||
chatStompClient.activate();
|
chatStompClient.activate();
|
||||||
|
|
||||||
const pingSocket = new SockJS("/ping");
|
|
||||||
const pingStompClient = new Client();
|
const pingStompClient = new Client();
|
||||||
pingStompClient.webSocketFactory = () => pingSocket;
|
pingStompClient.webSocketFactory = () => new SockJS("/ping");
|
||||||
pingStompClient.activate();
|
pingStompClient.activate();
|
||||||
|
|
||||||
pingStompClient.onConnect = () => {
|
pingStompClient.onConnect = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user