Use normal main() and avoid socket leak in test.

This commit is contained in:
Sönke Ludwig 2020-03-15 14:01:18 +01:00
parent 500385a303
commit 968ac82c8d

View file

@ -2,7 +2,6 @@
name "tests"
description "TCP disconnect task issue"
dependency "vibe-core" path="../"
versions "VibeDefaultMain"
+/
module test;
@ -10,7 +9,7 @@ import vibe.core.core;
import vibe.core.net;
import core.time : msecs;
shared static this()
void main()
{
auto l = listenTCP(0, (conn) {
auto td = runTask!TCPConnection((conn) {
@ -39,4 +38,8 @@ shared static this()
sleep(50.msecs);
exitEventLoop();
});
runApplication();
l.stopListening();
}