Close Socket.io connection after fetching data on server
This commit is contained in:
parent
d150c6cdba
commit
99679cc45b
4 changed files with 186 additions and 0 deletions
src/routes
0
src/routes/data/servers/+server.ts
Normal file
0
src/routes/data/servers/+server.ts
Normal file
0
src/routes/servers/+page.server.ts
Normal file
0
src/routes/servers/+page.server.ts
Normal file
|
@ -50,6 +50,7 @@ async function login(socket: Socket): Promise<string> {
|
|||
{ username: process.env.KUMA_USERNAME, password: process.env.KUMA_PASSWORD, token: '' },
|
||||
(res: { token: string }) => {
|
||||
token = res.token;
|
||||
socket.close();
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue