zig-network icon indicating copy to clipboard operation
zig-network copied to clipboard

fix: free resources in async server example

Open jmar910 opened this issue 4 months ago • 1 comments

I have been playing around with this library to learn zig, and I think I found an issue in the async example where clients are not being cleaned up correctly. I believe the client connection needs to be closed and the client struct needs to be freed when the loop breaks and handle returns (i.e. client is disconnected)

I am new to zig so I could be way off base here, but let me know if these changes make sense. Since this is just™️ an example, I figured it would be a pretty low stakes way to test my understanding and contribute.

jmar910 avatar Aug 16 '25 21:08 jmar910

I think we can delete the async example as it won't be compiled anyways.

async is being removed from the language and replaced with lower level primitives

ikskuh avatar Aug 17 '25 14:08 ikskuh