Megatest

Diff
Login

Differences From Artifact [7539e23e31]:

To Artifact [5e153aef1a]:


278
279
280
281
282
283
284
285

286
287
288
289
290
291
292
278
279
280
281
282
283
284

285
286
287
288
289
290
291
292







-
+







                                                      (debug:print 0 *default-log-port* "WARNING: failure in with-input-from-request to " fullurl ".")
                                                      (debug:print 0 *default-log-port* " message: " msg ", exn=" exn)
                                                      (debug:print 0 *default-log-port* " cmd: " cmd " params: " params " key:" (or server-id "thekey"))
                                                      (debug:print 0 *default-log-port* " call-chain: " call-chain)))
						;; what if another thread is communicating ok? Can't happen due to mutex
						(http-transport:close-connections runremote)
						(mutex-unlock! *http-mutex*)
						(close-connection! fullurl)
						;; (close-connection! fullurl)
						(db:obj->string #f))
					      (with-input-from-request ;; was dat
					       fullurl 
					       (list (cons 'key (or server-id   "thekey"))
						     (cons 'cmd cmd)
						     (cons 'params sparams))
					       read-string))
335
336
337
338
339
340
341
342
343
344





345
346
347
348
349
350
351
335
336
337
338
339
340
341



342
343
344
345
346
347
348
349
350
351
352
353







-
-
-
+
+
+
+
+







  (if (remote? runremote)
      (let ((api-dat (remote-api-uri runremote)))
	(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))
	  (close-connection! api-dat)
	  (if (and (args:any-defined? "-server" "-execute" "-run")
		   api-dat)
	      (begin ;; NOTE: Verify this actually ever gets hit. Jan 16, 2023.
		(debug:print-info 0 *default-log-port* "Closing connections to "api-dat)
		(close-connection! api-dat)))
	  (remote-conndat-set! runremote #f)
	  #t))
      #f))

;; run http-transport:keep-running in a parallel thread to monitor that the db is being 
;; used and to shutdown after sometime if it is not.
;;