Completed
Details
Details
Assignee
Unassigned
UnassignedReporter
Shogo Ohta
Shogo OhtaLabels
Approval
Ok
Patch
Code
Priority

Affects versions
Fix versions
Created November 24, 2015 at 3:53 PM
Updated December 1, 2015 at 5:47 PM
Resolved December 1, 2015 at 5:47 PM
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.
Patch: 0001-CLJ-1853-Require-the-ns-before-resolving-the-accept-.patch
Screened by: Alex Miller