Socket handle leak and active handle warning with Vibe-D

Steven Schveighoffer schveiguy at gmail.com
Mon Jan 4 17:17:10 UTC 2021


On 1/2/21 12:52 PM, Selim Ozel wrote:

> 
> After logging into to 127.0.0.1 for a single time in my browser, if I do 
> a ctrl+c it still leaks two socket handles.
> 
> With connection Windows 10:
>> Running .\vibe_noleaks.exe
>> [main(----) INF] Listening for requests on http://[::1]:8080/
>> [main(----) INF] Listening for requests on http://127.0.0.1:8080/
>> [main(----) INF] Please open http://127.0.0.1:8080/ in your browser.
>> [00000000(----) INF] Received signal 2. Shutting down.
>> [main(----) INF] Stopped to listen for HTTP^ requests on C::1:8080
>> [main(----
>> ) INFC:\Software\vibe_noLeaks>] Stopped to listen for HTTP requests on 
>> 127.0.0.1:8080
>> Warning: 2 socket handles leaked at driver shutdown.
>> Warning: 2 socket handles leaked at driver shutdown.

This is normal. The server uses keepalive connections, so that in case 
any more requests arrive on the same connection, the initial connection 
setup does not need to be established. Well, at least that is what I 
think is happening.

If you want a few seconds (I think 5 or so), then you won't get these.

It would be good if vibe-d could provide a way to shut down any 
keepalive connections when the server is shutting down.

-Steve


More information about the Digitalmars-d-learn mailing list