Eugeny/russh

[docs request] clarity re panic safety

Closed this issue · 1 comments

I've noticed that a panic inside of Server::new_client results in the entire process panicking. But a panic inside of the methods of Handler, eg Handler::auth_none, are caught and do not result in the process panicking.

Is this behavior by design? Is it guaranteed as part of the library spec? OOC why are panic's in Server::new_client not handled gracefully like the Handler methods?

This that's a side effect of using tokio - it catches panics in tasks.

russh doesn't cause panics by itself and doesn't include any panic handling for user code.