Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -944,16 +944,18 @@ (tl (launch:setup)) (keys (keys:config-get-fields *configdat*))) (case (rmt:transport-mode) ((http)(http-transport:launch)) ((tcp) - (debug:print 0 *default-log-port* "INFO: Running using tcp method.") - (if dbfname - (tt:start-server tl #f dbfname api:tcp-dispatch-request-make-handler keys) - (begin - (debug:print 0 *default-log-port* "ERROR: transport mode is tcp - -db is required.") - (exit 1)))) + (let* ((timeout (server:expiration-timeout))) + (debug:print 0 *default-log-port* "INFO: Running using tcp method with server timeout of "timeout) + (tt-server-timeout-param timeout) + (if dbfname + (tt:start-server tl #f dbfname api:tcp-dispatch-request-make-handler keys) + (begin + (debug:print 0 *default-log-port* "ERROR: transport mode is tcp - -db is required.") + (exit 1))))) (else (debug:print 0 *default-log-port* "ERROR: rmt:transport-mode value not recognised "(rmt:transport-mode)))) (set! *didsomething* #t))) ;; The adjutant is a bit different, it does NOT run (launch:setup) as it is not necessarily tied to ;; a specific Megatest area. Detail are being hashed out and this may change. Index: tcp-transportmod.scm ================================================================== --- tcp-transportmod.scm +++ tcp-transportmod.scm @@ -102,10 +102,14 @@ (last-access (current-seconds)) (servinf-file #f) (last-serv-start 0) ) +;; parameters +;; +(define tt-server-timeout-param (make-parameter 300)) + ;; make ttdat visible (define *server-info* #f) (define (tt:make-remote areapath) (make-tt areapath: areapath)) @@ -451,11 +455,11 @@ (begin (set! (file-modification-time (tt-servinf-file ttdat)) (current-seconds)) ((dbr:dbstruct-sync-proc dbstruct) last-update) (dbr:dbstruct-last-update-set! dbstruct curr-secs)))) - (if (< (- (current-seconds) (tt-last-access ttdat)) 60) + (if (< (- (current-seconds) (tt-last-access ttdat)) (tt-server-timeout-param)) (begin (thread-sleep! 5) (loop))))) (cleanup) (debug:print 0 *default-log-port* "INFO: Server timed out, exiting.")))