mirror of
https://git.robbyzambito.me/zaprus
synced 2026-02-04 08:24:52 +00:00
Skip empty stdin
This commit is contained in:
@@ -107,6 +107,10 @@ pub fn main(init: std.process.Init) !void {
|
||||
var stdin = &limited.interface;
|
||||
|
||||
while (stdin.fillMore()) {
|
||||
// Sometimes fillMore will return 0 bytes.
|
||||
// Skip these
|
||||
if (stdin.seek == stdin.end) continue;
|
||||
|
||||
chunk_writer.end = 0;
|
||||
try chunk_writer.print("{b64}", .{stdin.buffered()});
|
||||
try client.sendRelay(init.io, chunk_writer.buffered(), parseDest(flags.dest));
|
||||
|
||||
Reference in New Issue
Block a user