Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions addons/netfox.noray/noray.gd
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ func _handle_commands(command: String, data: String):
_logger.debug("Saved PID: %s", [pid])
elif command == "connect":
var parts = data.split(":")
# On failure, noray replies with the same command name and an error message
if parts.size() != 2 or not parts[1].is_valid_int():
_logger.error("Failed to connect over NAT: %s", [data])
return
var host = parts[0]
var port = parts[1].to_int()
_logger.debug("Received connect command to %s:%s", [host, port])
Expand Down