The first part of my code looks like this

(defn handle-client [in out]
        (binding [
                *in* (reader in)
                ]
                (with-connection db
                        (let [outstream (writer out)]
                                (loop []
                                        (let [xml
                                                (loop [result [] input 
(read-line)]
                                                  .........

(def server (create-server *port* handle-client))

The purpose of the handle is to receive XML , parse it and retrieve
data from a database table and send some XML back to the client.

The problem is that the above code only works if I establish a
connection outside the handle-client function. Otherwise the first
reply to my client gets lost.

Has anyone an explanation for this ?

Regards
  Roger


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to