mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-22 09:40:25 +01:00
Add alert if there is a connection error
This commit is contained in:
parent
d8156e0d5a
commit
cabd5c305b
1 changed files with 4 additions and 1 deletions
|
@ -51,7 +51,10 @@ func _process(delta):
|
|||
var res = stream_peer.get_data(stream_peer.get_available_bytes())
|
||||
var error = res[0]
|
||||
var data = res[1]
|
||||
if error == OK and not data.empty():
|
||||
if error != OK:
|
||||
OS.alert("Something went wrong with the TCP connection to socat.",
|
||||
"Connection Error!")
|
||||
elif not data.empty():
|
||||
emit_signal("data_received", data)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue