send a message immediately on connect

This commit is contained in:
Ayase Minori 2023-10-24 00:15:41 +08:00 committed by GitHub
parent 41be1559f1
commit 548a35c4bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,6 +116,7 @@ export default function Counter(props: SharedProps) {
console.log(
`[${new Date().toISOString()}] Connected to statistics socket`,
);
ws.send(0x0.toString());
};
ws.onmessage = (e) => {