Fix hanging while sending large data
Fix hanging while sending large data

Jobs could hang if the server was terminated while a transfer was in
progress. We now wait properly that every transfer is finished before
stopping the server.

fsteinmetz/runlib