Restarting the codehosting SSH server drops existing connections. This means that deploying new versions is quite disruptive, enough that we apparently don't deploy codehosting updates as frequently as lpnet updates. (i.e. monthly rather than daily, IIUC)
A relatively cheap fix would be to change the server to accept a signal of some sort (possibly a POSIX signal like SIGHUP, possibly some other mechanism) that tells it to stop listening on the SSH port. This would allow a new process to begin listening on that port. Existing connections wouldn't be disrupted. Also the server would need to be changed so that after receiving that signal the process would shut itself down once all outstanding connections have closed.
Other resources like pidfiles and perhaps logfiles may need to be handled differently too, a crude mechanism would be to have “a” and “b” directories for those, and when restarting the admin would simply pick the one not in use.
A more elegant approach may be to run N copies of the server behind a load balancer, similarly to how lpnet is deployed, so that individual processes can be taken out of the rotation and stopped and restarted without affecting the rest of the service. This is probably a good idea for scalability reasons anyway.
See also rt #40480 which requests an HA configuration. This makes it a lot simpler: have a status page HA proxy can query, on shutdown requests start issuing 500's to that page, and when the last active client d/c's actually terminate.