Index: client.scm ================================================================== --- client.scm +++ client.scm @@ -105,11 +105,13 @@ (if (or (not runremote) (not (remote-conndat runremote))) (begin ;; Here we are creating a runremote where there was none or it was clobbered with #f ;; - (set! runremote (make-remote)) + (if (not runremote) + (set! runremote (make-remote)) + (http-transport:close-connections runremote)) (let* ((server-info (server:check-if-running areapath))) (remote-server-info-set! runremote server-info) (if server-info (begin (remote-server-url-set! runremote (server:record->url server-info)) Index: http-transport.scm ================================================================== --- http-transport.scm +++ http-transport.scm @@ -337,12 +337,11 @@ (handle-exceptions exn (begin (print-call-chain *default-log-port*) (debug:print-error 0 *default-log-port* " closing connection failed with error: " ((condition-property-accessor 'exn 'message) exn) ", exn=" exn)) - (if (args:any-defined? "-server" "-execute" "-run") - (debug:print-info 0 *default-log-port* "Closing connections to "api-dat)) + (debug:print-info 0 *default-log-port* "Closing connections to "api-dat) (if api-dat (close-connection! api-dat)) (remote-conndat-set! runremote #f) #t)) #f))