summaryrefslogtreecommitdiff
path: root/modules/ssh/tunnel.scm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ssh/tunnel.scm')
-rw-r--r--modules/ssh/tunnel.scm26
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/ssh/tunnel.scm b/modules/ssh/tunnel.scm
index d12ad12..fef4591 100644
--- a/modules/ssh/tunnel.scm
+++ b/modules/ssh/tunnel.scm
@@ -226,19 +226,19 @@ unspecified."
(while (connected? (tunnel-session tunnel))
(receive (channel port)
(channel-accept-forward (tunnel-session tunnel) 1000)
- (and channel
- (let* ((sock (socket PF_INET SOCK_STREAM 0)))
- (tunnel-connect tunnel sock)
- (while (channel-open? channel)
- (cond-io
- (channel -> sock => transfer)
- (sock -> channel => transfer)
- (else
- ;; XXX: Very hacky. We should use something like 'select'
- ;; here.
- (when (channel-open? channel)
- (usleep timeout)
- (idle-proc sock channel)))))))))))
+ (when channel
+ (let ((sock (socket PF_INET SOCK_STREAM 0)))
+ (tunnel-connect tunnel sock)
+ (while (channel-open? channel)
+ (cond-io
+ (channel -> sock => transfer)
+ (sock -> channel => transfer)
+ (else
+ ;; XXX: Very hacky. We should use something like 'select'
+ ;; here.
+ (when (channel-open? channel)
+ (usleep timeout)
+ (idle-proc sock channel)))))))))))
(define* (start-forward tunnel #:optional (idle-proc (const #f)))