Remove warnings and errors
This commit is contained in:
parent
160d0dbebe
commit
724a351d96
2 changed files with 8 additions and 6 deletions
12
server.ts
12
server.ts
|
@ -62,11 +62,13 @@ class Client {
|
|||
|
||||
send(message: Message) {
|
||||
try {
|
||||
this.socket.send(
|
||||
typeof message === "object"
|
||||
? ("json:" + JSON.stringify(message))
|
||||
: message,
|
||||
);
|
||||
if (this.isConnected()) {
|
||||
this.socket.send(
|
||||
typeof message === "object"
|
||||
? ("json:" + JSON.stringify(message))
|
||||
: message,
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(
|
||||
`Failed to send on socket ${this.socket} to client ${this.id}. Disconnecting and removing...`,
|
||||
|
|
|
@ -35,7 +35,7 @@ func connect_to_websocket_signaller(url: String):
|
|||
print("Attempting to connect to WebSocket signalling server at ", url)
|
||||
var _result = ws.connect_to_url(url)
|
||||
|
||||
func _closed():
|
||||
func _closed(_unknown):
|
||||
emit_signal("websocket_disconnected")
|
||||
|
||||
func _close_request(code: int, reason: String):
|
||||
|
|
Loading…
Reference in a new issue