Remove warnings and errors

This commit is contained in:
Daniel Flanagan 2021-11-17 14:01:35 -06:00
parent 160d0dbebe
commit 724a351d96
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 8 additions and 6 deletions

View file

@ -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...`,

View file

@ -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):