2017-02-16 23:49:40 +00:00
|
|
|
/+ dub.sdl:
|
2016-10-24 06:32:16 +00:00
|
|
|
name "test"
|
|
|
|
description "Invalid memory operation on TCP connection leakage at shutdown"
|
2016-10-24 06:37:32 +00:00
|
|
|
dependency "vibe-core" path="../"
|
2017-02-16 23:49:40 +00:00
|
|
|
debugVersions "VibeAsyncLog"
|
2016-10-24 06:32:16 +00:00
|
|
|
+/
|
|
|
|
module test;
|
|
|
|
|
2016-03-11 07:23:04 +00:00
|
|
|
import vibe.core.core;
|
|
|
|
import vibe.core.net;
|
|
|
|
import core.time : msecs;
|
|
|
|
|
|
|
|
class C {
|
|
|
|
TCPConnection m_conn;
|
|
|
|
|
|
|
|
this()
|
|
|
|
{
|
2016-10-24 06:22:37 +00:00
|
|
|
m_conn = connectTCP("example.com", 443);
|
2016-03-11 07:23:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
~this()
|
|
|
|
{
|
|
|
|
m_conn.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
auto c = new C;
|
|
|
|
// let druntime collect c during shutdown
|
|
|
|
}
|