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