fix some bun related issues
This commit is contained in:
parent
7159558e5e
commit
2c6835e2b3
2 changed files with 14 additions and 10 deletions
|
|
@ -36,7 +36,7 @@ export class Server {
|
|||
|
||||
async start(port: number) {
|
||||
this.server = Bun.listen<{dataBuffer?: Buffer}>({
|
||||
hostname: "localhost",
|
||||
hostname: process.env.HOST!,
|
||||
port: +process.env.PORT!,
|
||||
socket: {
|
||||
data: (socket, data) => {
|
||||
|
|
@ -67,7 +67,9 @@ export class Server {
|
|||
open: (socket) => {
|
||||
socket.data = {}
|
||||
},
|
||||
close(socket) {},
|
||||
close: async (socket) => {
|
||||
await this.removeUser(socket, "Disconnected");
|
||||
},
|
||||
drain(socket) {},
|
||||
error(socket, error) {},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue