Commit e69c8dbc authored by Andreas Kempe's avatar Andreas Kempe
Browse files

Improve failure logging

parent 03e1b8a6
......@@ -57,7 +57,7 @@ class ClientAcceptor is TCPListenNotify
recover ClientNotifier(env.out, client) end
fun ref not_listening(listen: TCPListener ref) =>
None
env.out.print("No longer listening")
class ClientNotifier is TCPConnectionNotify
"""
......@@ -170,6 +170,7 @@ actor Client is ProxyClient
elseif from is remote then
remote_buffer.concat(data.values())
else
out.print("ERROR: Received data from connection that was neither local nor remote")
out.print("ERROR: Received data from connection " +
"that was neither local nor remote")
end
end
......@@ -72,6 +72,10 @@ actor Main
let remote_port = cmd.option("remote_port").string()
env.out.print("Running as client")
env.out.print("Listening on " + address + ":" +
port + "/tcp")
env.out.print("Server at " + remote_address + ":"
+ port + "/tcp")
recover iso
ClientAcceptor(env,
env.root as AmbientAuth,
......@@ -83,9 +87,14 @@ actor Main
recover iso ProxyAcceptor(env) end
end
TCPListener(env.root as AmbientAuth,
consume acceptor,
address, port)
try
TCPListener(env.root as AmbientAuth,
consume acceptor,
address, port)
else
env.out.print("Error listening on " + address + ":" +
port + "/tcp")
end
else
env.out.print("General Error")
env.exitcode(1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment