Launch save thread before the listener
authorFrank Duncan <frank@kank.net>
Fri, 10 Dec 2021 11:40:30 +0000 (05:40 -0600)
committerFrank Duncan <frank@kank.net>
Fri, 10 Dec 2021 11:40:30 +0000 (05:40 -0600)
src/main/server.lisp

index afa5aa005520080139567eceacffa83c6e20f948..432c83dffb6ff3338f77fe76e80be88c12034681 100644 (file)
@@ -2,14 +2,14 @@
 
 (defun server (port &optional (background t))
  (lame-db:load-known-dbs "/home/herbie/.lame-db/data")
- (communication:start-listener port background)
  (sb-thread:make-thread
   (lambda ()
    (do () (nil)
     (progn
      (sleep (* 5 60))
      (lame-db:save-known-dbs "/home/herbie/.lame-db/data"))))
-  :name "Save Thread"))
+  :name "Save Thread")
+ (communication:start-listener port background))
 
 (defun add-project (name src)
  (make-project :name name :src src)