From ce9117e5bf87cbd8e590f733576d547a85c69b68 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 3 Jul 2022 22:55:20 +0530 Subject: bin: Correctly support REPL listening on TCP socket. Prior to this, the REPL would listen on a Unix socket even if a TCP socket was requested. * bin/tissue (tissue-run-web): Correctly support REPL listening on TCP socket. --- bin/tissue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/tissue b/bin/tissue index e1707a8..8484363 100755 --- a/bin/tissue +++ b/bin/tissue @@ -225,7 +225,10 @@ Run a web search service reading configuration from CONFIG-FILE. (list (option '("listen-repl") #t #f (lambda (opt name arg result) - (acons 'listen-repl arg result)))) + (acons 'listen-repl + (or (string->number arg) + arg) + result)))) invalid-option (lambda (config-file result) (append (call-with-input-file config-file @@ -243,9 +246,9 @@ Run a web search service reading configuration from CONFIG-FILE. (make-unix-domain-server-socket #:path listen-repl)) (else (format (current-error-port) - "REPL server listening on ~a~%" + "REPL server listening on port ~a~%" listen-repl) - (make-unix-domain-server-socket #:path listen-repl)))))) + (make-tcp-server-socket #:port listen-repl)))))) (start-web-server (listen->socket-address (assq-ref args 'listen)) (map (match-lambda ((name parameters ...) -- cgit v1.2.3