diff options
| author | 2018-05-15 00:27:52 +0200 | |
|---|---|---|
| committer | 2018-05-15 00:27:52 +0200 | |
| commit | 08d9ec01cf59c7bb3febe3c4600e9efeb81901e3 (patch) | |
| tree | 8b09520d8b31c5153c9a458d1a596264c21cdf3c /src/client.c | |
| parent | ca6f4718deb56367bbae33312e0f341e0595f3eb (diff) | |
| download | usbmuxd-08d9ec01cf59c7bb3febe3c4600e9efeb81901e3.tar.gz usbmuxd-08d9ec01cf59c7bb3febe3c4600e9efeb81901e3.tar.bz2 | |
device: Flush buffer to client when remote side unexpectedly terminates connection
Diffstat (limited to 'src/client.c')
| -rw-r--r-- | src/client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.c b/src/client.c index a9c986a..bbdac84 100644 --- a/src/client.c +++ b/src/client.c | |||
| @@ -113,7 +113,8 @@ int client_write(struct mux_client *client, void *buffer, uint32_t len) | |||
| 113 | sret = send(client->fd, buffer, len, 0); | 113 | sret = send(client->fd, buffer, len, 0); |
| 114 | if (sret < 0) { | 114 | if (sret < 0) { |
| 115 | if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) { | 115 | if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) { |
| 116 | usbmuxd_log(LL_ERROR, "ERROR: client_write: fd %d not ready for writing", client->fd); | 116 | usbmuxd_log(LL_DEBUG, "client_write: fd %d not ready for writing", client->fd); |
| 117 | sret = 0; | ||
| 117 | } else { | 118 | } else { |
| 118 | usbmuxd_log(LL_ERROR, "ERROR: client_write: sending to fd %d failed: %s", client->fd, strerror(errno)); | 119 | usbmuxd_log(LL_ERROR, "ERROR: client_write: sending to fd %d failed: %s", client->fd, strerror(errno)); |
| 119 | } | 120 | } |
