Namespaces

 
0.2.0-SNAPSHOT permalink Arrow_down_16x16

with-connection

clj-ssh.ssh

  • (with-connection session & body)
Creates a context in which the session is connected. Ensures the session is
disconnected on exit.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clj_ssh/ssh.clj:282 top

(defmacro with-connection
  "Creates a context in which the session is connected. Ensures the session is
  disconnected on exit."
  [session & body]
  `(let [session# ~session]
     (try
      (when-not (connected? session#)
        (connect session#))
      ~@body
      (finally (disconnect session#)))))
Vars in clj-ssh.ssh/with-connection: with-connection defmacro apply concat let list seq vector when-not
Used in 0 other vars

Comments top

No comments for with-connection. Log in to add a comment.