On Wed, 23 Jul 2014 20:00:13 GMT, Rory wrote:
Hi,
Anyone know what I'm doing wrong here?
This program crashes if the client closes the connection. Error message is:
Task terminated with unhandled exception: Trying to acquire a TCP connection that is currently owned.import vibe.d;
shared static this() {
listenTCP(2500, (conn) { auto remoteconn = connectTCP("localhost", 2525); runTask(() { remoteconn.write(conn); }); conn.write(remoteconn); });
}
That is actually supposed to work like that, AFAICS. Do you have a call stack for the assertion? Otherwise I'll write a quick reproduction case to see what goes wrong.