Skip to content

Commit f508288

Browse files
committed
Fix segfault when multiple inflight Send completions fail
1 parent 18080ce commit f508288

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/server.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,14 @@ const Server = struct {
223223
&self.close_completion,
224224
socket,
225225
);
226-
}
227-
228-
fn callbackClose(self: *Server, completion: *Completion, _: CloseError!void) void {
229-
std.debug.assert(completion == &self.close_completion);
230226
var client = self.client.?;
231227
client.deinit();
232228
self.client_pool.destroy(client);
233229
self.client = null;
230+
}
231+
232+
fn callbackClose(self: *Server, completion: *Completion, _: CloseError!void) void {
233+
std.debug.assert(completion == &self.close_completion);
234234
self.queueAccept();
235235
}
236236
};

0 commit comments

Comments
 (0)