vibe-core/tests/vibe.core.net.1452.d

32 lines
457 B
D
Raw Normal View History

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