In 1.8.0 RC2, if you start a socket server with a user-defined accept-fn like the following (clojure.test/testing-contexts-str is just a 0-arity fn used as an example accept fn here):
And then, if you connect to it with a command like "telnet 127.0.0.1 5555", you'll get an NPE.
This doesn't happen when starting the server with a pre-defined accept-fn, such as clojure.core.server/repl.
Cause: At the moment, clojure.core.server/accept-connection will require the namespace in which the accept-fn is defined after resolving the accept-fn. However, in order to resolve the accept-fn successfully, requiring the ns should be done prior to it.
Approach: Requiring the ns before resolving the accept-fn.
Screened by: Alex Miller