aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files/src/upload_stream_module.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-10-29 15:15:28 +0100
committerfiaxh <git@mx.ax.lt>2017-10-31 15:41:45 +0100
commit0102abeec1d2055b19dccbb7edc7f06e527642b1 (patch)
tree4018e82224c19142c4a7a6eced67d9c2550b2dd8 /plugins/http-files/src/upload_stream_module.vala
parentb9df78e4494879752e9e68dcc5d54e03fffe9467 (diff)
downloaddino-0102abeec1d2055b19dccbb7edc7f06e527642b1.tar.gz
dino-0102abeec1d2055b19dccbb7edc7f06e527642b1.zip
Fix warnings
Diffstat (limited to 'plugins/http-files/src/upload_stream_module.vala')
-rw-r--r--plugins/http-files/src/upload_stream_module.vala8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/http-files/src/upload_stream_module.vala b/plugins/http-files/src/upload_stream_module.vala
index ee70e49d..08e6105f 100644
--- a/plugins/http-files/src/upload_stream_module.vala
+++ b/plugins/http-files/src/upload_stream_module.vala
@@ -21,7 +21,11 @@ public class UploadStreamModule : XmppStreamModule {
Array<uint8> data = new Array<uint8>(false, true, 0);
size_t len = -1;
do {
- len = input_stream.read(buf);
+ try {
+ len = input_stream.read(buf);
+ } catch (IOError error) {
+ error_listener(stream, @"HTTP upload: IOError reading stream: $(error.message)");
+ }
data.append_vals(buf, (uint) len);
} while(len > 0);
@@ -41,7 +45,7 @@ public class UploadStreamModule : XmppStreamModule {
}
});
},
- error_listener);
+ (stream, error) => error_listener(stream, error));
}
private delegate void OnSlotOk(XmppStream stream, string url_get, string url_put);