(chunk)
| 1019 | |
| 1020 | src.on('data', ondata); |
| 1021 | function ondata(chunk) { |
| 1022 | debug('ondata'); |
| 1023 | try { |
| 1024 | const ret = dest.write(chunk); |
| 1025 | debug('dest.write', ret); |
| 1026 | |
| 1027 | if (ret === false) { |
| 1028 | pause(); |
| 1029 | } |
| 1030 | } catch (error) { |
| 1031 | dest.destroy(error); |
| 1032 | } |
| 1033 | } |
| 1034 | |
| 1035 | // If the dest has an error, then stop piping into it. |
| 1036 | // However, don't suppress the throwing behavior for this. |