this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

client: setsockopt before first read

+6 -7
+6 -7
src/irc.zig
··· 605 605 var start: usize = 0; 606 606 607 607 while (true) { 608 + try std.posix.setsockopt( 609 + self.stream.handle, 610 + std.posix.SOL.SOCKET, 611 + std.posix.SO.RCVTIMEO, 612 + &timeout, 613 + ); 608 614 const n = self.read(buf[start..]) catch |err| { 609 615 if (err != error.WouldBlock) break; 610 616 const now = std.time.milliTimestamp(); ··· 622 628 continue; 623 629 }; 624 630 if (self.should_close) return; 625 - log.debug("read {d}", .{n}); 626 631 if (n == 0) { 627 632 self.status = .disconnected; 628 633 loop.postEvent(.redraw); ··· 645 650 std.mem.copyForwards(u8, buf[0 .. (n + start) - i], buf[i..(n + start)]); 646 651 start = (n + start) - i; 647 652 } else start = 0; 648 - try std.posix.setsockopt( 649 - self.stream.handle, 650 - std.posix.SOL.SOCKET, 651 - std.posix.SO.RCVTIMEO, 652 - &timeout, 653 - ); 654 653 } 655 654 } 656 655 }