2016-10-24 06:32:16 +00:00
|
|
|
/++ dub.sdl:
|
|
|
|
name "test"
|
|
|
|
description "Invalid memory operation on TCP connection leakage at shutdown"
|
|
|
|
dependency "vibe-core" path="../../"
|
|
|
|
+/
|
|
|
|
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
|
|
|
|
}
|