semantic bufo search find-bufo.com
bufo
1
fork

Configure Feed

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

fix: use fresh http client for image fetches

avoids stale connection errors (HttpConnectionClosing) by creating
a new client per image fetch instead of reusing the shared one

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

zzstoatzz 66b42def 6fcd5932

+5 -1
+5 -1
bot/src/bsky.zig
··· 233 233 } 234 234 235 235 pub fn fetchImage(self: *BskyClient, url: []const u8) ![]const u8 { 236 + // use fresh client to avoid stale connection issues 237 + var client: http.Client = .{ .allocator = self.allocator }; 238 + defer client.deinit(); 239 + 236 240 var aw: Io.Writer.Allocating = .init(self.allocator); 237 241 errdefer aw.deinit(); 238 242 239 - const result = self.client.fetch(.{ 243 + const result = client.fetch(.{ 240 244 .location = .{ .url = url }, 241 245 .method = .GET, 242 246 .response_writer = &aw.writer,