Socket handle leak and active handle warning with Vibe-D
Steven Schveighoffer
schveiguy at gmail.com
Mon Jan 15 17:45:16 UTC 2024
On Monday, 15 January 2024 at 17:24:40 UTC, bomat wrote:
> On Sunday, 14 January 2024 at 20:36:44 UTC, Steven
> Schveighoffer wrote:
>> There should be a version you can enable that tells you where
>> that socket handle was allocated. That might give you a
>> further clue as to why it's not closed when the system shuts
>> down.
>>
>> I think the program tells you which version to enable when
>> this happens, but if not, let me know and I'll find it.
>
> Thanks for the response, Steve.
> Hmmm, not sure if I'm missing something, but this is all the
> output I get from the program:
> ```
> [main(----) INF] Listening for requests on http://[::1]:8080/
> [main(----) INF] Listening for requests on
> http://127.0.0.1:8080/
> [00000000(----) INF] Received signal 2. Shutting down.
> [main(----) INF] Stopped to listen for HTTP requests on ::1:8080
> [main(
> ----) INF] Stopped to listen for HTTP requests on 127.0.0.1:8080
> Warning: 1 socket handles leaked at driver shutdown.
> Warning: 1 socket handles leaked at driver shutdown.
> ```
> Unless there's some switch to make it more verbose?
Which driver are you using? In the posix driver, it should
mention (and use) the debug flag `EventCoreLeakTrace`.
https://github.com/vibe-d/eventcore/blob/7fa0a15fa541c3fcf65640ee332fd3a09c34730c/source/eventcore/drivers/posix/driver.d#L130
I didn't realize this wasn't across the board...
-Steve
More information about the Digitalmars-d-learn
mailing list