forked from syndicate-lang/marketplace-ssh-2014
Tighten
This commit is contained in:
parent
60af9eae09
commit
10e5e2cf91
|
@ -52,18 +52,15 @@
|
||||||
(at conn-ds
|
(at conn-ds
|
||||||
(once
|
(once
|
||||||
[(message (ssh-identification-line $remote-identification))
|
[(message (ssh-identification-line $remote-identification))
|
||||||
(if (not (regexp-match #rx"^SSH-2\\.0-.*" remote-identification))
|
(cond
|
||||||
(begin
|
[(regexp-match #rx"^SSH-2\\.0-.*" remote-identification)
|
||||||
(log-error "Invalid peer identification string ~v" remote-identification)
|
(send! (inbound-credit 1))
|
||||||
(stop-actor-system))
|
(spawn
|
||||||
(begin
|
#:name 'session
|
||||||
(send! (inbound-credit 1))
|
(ssh-session conn-ds ground-ds local-identification remote-identification 'server))]
|
||||||
(spawn #:name 'session
|
[else
|
||||||
(ssh-session conn-ds
|
(log-error "Invalid peer identification string ~v" remote-identification)
|
||||||
ground-ds
|
(stop-actor-system)])])
|
||||||
local-identification
|
|
||||||
remote-identification
|
|
||||||
'server))))])
|
|
||||||
|
|
||||||
(during (SshAuthenticatedUser $user-name #"ssh-connection")
|
(during (SshAuthenticatedUser $user-name #"ssh-connection")
|
||||||
(run-repl-instance conn-ds user-name))
|
(run-repl-instance conn-ds user-name))
|
||||||
|
|
Loading…
Reference in New Issue