Fix deprecations in tests and examples

This commit is contained in:
Geod24 2020-08-20 11:57:07 +09:00
parent 467c6a0996
commit ca9119af62
6 changed files with 70 additions and 50 deletions

View file

@ -1,9 +1,14 @@
import vibe.core.core : runApplication;
import vibe.core.log;
import vibe.core.net : listenTCP;
import vibe.core.stream : pipe;
void main()
{
listenTCP(7000, (conn) { pipe(conn, conn); });
listenTCP(7000, (conn) @safe nothrow {
try pipe(conn, conn);
catch (Exception e)
logError("Error: %s", e.msg);
});
runApplication();
}