Warn when ssh channel write failed

This commit is contained in:
oupson 2023-02-26 16:03:24 +01:00
parent dba7b10698
commit 287474bd41
Signed by: oupson
GPG Key ID: 3BD88615552EFCB7
1 changed files with 4 additions and 1 deletions

View File

@ -177,7 +177,10 @@ namespace FooTerm {
size_t size = 0;
source.read_chars(buffer, out size);
this.channel.write ((uint8[])buffer[0:size]);
var res = this.channel.write ((uint8[])buffer[0:size]);
if (res < 0) {
warning("Channel write failed with %zu", res);
}
return true;
} catch (Error e) {
GLib.warning("Failed to read from terminal : %s", e.message);