diff --git a/syndicate-ssh/new-server.rkt b/syndicate-ssh/new-server.rkt index e2ec9d5..29f707d 100644 --- a/syndicate-ssh/new-server.rkt +++ b/syndicate-ssh/new-server.rkt @@ -52,18 +52,15 @@ (at conn-ds (once [(message (ssh-identification-line $remote-identification)) - (if (not (regexp-match #rx"^SSH-2\\.0-.*" remote-identification)) - (begin - (log-error "Invalid peer identification string ~v" remote-identification) - (stop-actor-system)) - (begin - (send! (inbound-credit 1)) - (spawn #:name 'session - (ssh-session conn-ds - ground-ds - local-identification - remote-identification - 'server))))]) + (cond + [(regexp-match #rx"^SSH-2\\.0-.*" remote-identification) + (send! (inbound-credit 1)) + (spawn + #:name 'session + (ssh-session conn-ds ground-ds local-identification remote-identification 'server))] + [else + (log-error "Invalid peer identification string ~v" remote-identification) + (stop-actor-system)])]) (during (SshAuthenticatedUser $user-name #"ssh-connection") (run-repl-instance conn-ds user-name))