diff options
author | sin <sin@2f30.org> | 2014-09-24 15:01:41 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-24 15:01:41 +0100 |
commit | c824892bf34e64c02f62ede24200131a23005462 (patch) | |
tree | 37433e60eba07c5c927dda5e8bf6deff52c55407 | |
parent | b87b960daaa2c4d79728d8e1d97f2d0ce1339883 (diff) |
Keep trying to write until we succeed
-rw-r--r-- | ratox.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -543,10 +543,14 @@ cbfiledata(Tox *m, int32_t fid, uint8_t fnum, const uint8_t *data, uint16_t len, if (!f) return; +again: n = write(f->fd[FFILE_OUT], data, len); - if (n < 0) + if (n < 0) { if (errno == EPIPE) cancelrxtransfer(f); + if (errno == EWOULDBLOCK) + goto again; + } } static void |