Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -737,11 +737,11 @@ (if (string? tmo) (let* ((num (string->number tmo))) (if num (* 3600 num) (common:hms-string->seconds tmo))) - 600 ;; this is the default + 10 ;; this is the default ))) (define (server:get-best-guess-address hostname) (let ((res #f)) (for-each Index: tcp-transportmod.scm ================================================================== --- tcp-transportmod.scm +++ tcp-transportmod.scm @@ -107,11 +107,11 @@ (last-serv-start 0) ) ;; parameters ;; -(define tt-server-timeout-param (make-parameter 600)) +(define tt-server-timeout-param (make-parameter 10)) ;; make ttdat visible (define *server-info* #f) (define (tt:make-remote areapath) @@ -126,10 +126,14 @@ (not run-id)) (equal? (dbfile:run-id->dbfname run-id) dbfname))) (tcp-buffer-size 2048) ;; (max-connections 4096) + +;;====================================================================== +;; Client side +;;====================================================================== ;; do all the busy work of finding and setting up conn for ;; connecting to a server ;; (define (tt:client-connect-to-server ttdat dbfname run-id testsuite) @@ -171,10 +175,11 @@ (thread-sleep! 0.5) (tt:client-connect-to-server ttdat dbfname run-id testsuite)) (else (let* ((curr-secs (current-seconds))) ;; rm the (last server) would go here + (hash-table-delete! (tt-conns ttdat) dbfname) (if (> (- curr-secs (tt-last-serv-start ttdat)) 10) (begin (tt-last-serv-start-set! ttdat curr-secs) (server-start-proc))) ;; start server if 30 sec since last attempt (thread-sleep! 1) @@ -184,10 +189,11 @@ (begin (debug:print-info 0 *default-log-port* "No server found. Starting one for run-id "run-id" in dbfile "dbfname) (server-start-proc) (tt-last-serv-start-set! ttdat (current-seconds)))) (thread-sleep! 1) + (hash-table-delete! (tt-conns ttdat) dbfname) (tt:client-connect-to-server ttdat dbfname run-id testsuite))))))) (define (tt:ping host port server-id #!optional (tries-left 5)) (let* ((res (tt:send-receive-direct host port `(ping #f #f #f) ping-mode: #t)) ;; please send me your server-id (try-again (lambda ()