After stopping an acceptor with STOP, one can't start it again with START, because the START method doesn't reset the value of acceptor-shutdown-p to NIL, so the listener returns/quits instantly.
Also, the default value of ACCEPTOR-SHUTDOWN-P should be T, because every acceptor should be closed when it is created.
See [1] & [2] for details.
[1] http://article.gmane.org/gmane.lisp.lib.tbnl.general/2469 [2] http://article.gmane.org/gmane.lisp.lib.tbnl.general/2868 --- acceptor.lisp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/acceptor.lisp b/acceptor.lisp index ba90e2e..168c9b9 100644 --- a/acceptor.lisp +++ b/acceptor.lisp @@ -120,7 +120,7 @@ connections.") :documentation "Number of pending connections allowed in the listen socket before the kernel rejects further incoming connections.") - (acceptor-shutdown-p :initform nil + (acceptor-shutdown-p :initform t :accessor acceptor-shutdown-p :documentation "A flag that makes the acceptor shutdown itself when set to something other than NIL.") @@ -266,6 +266,7 @@ they're using secure connections - see the SSL-ACCEPTOR class.")) ;; general implementation
(defmethod start ((acceptor acceptor)) + (setf (acceptor-shutdown-p acceptor) nil) (start-listening acceptor) (let ((taskmaster (acceptor-taskmaster acceptor))) (setf (taskmaster-acceptor taskmaster) acceptor)
I sent this patch here [2] but no response, no reason. So I decide to send it again. If it's still not accepted, I'm going to maintain my own fork somewhere.
Thanks, Des
On Sun, 20 Mar 2011, Desmond O. Chang wrote:
I sent this patch here [2] but no response, no reason. So I decide to send it again. If it's still not accepted, I'm going to maintain my own fork somewhere.
Thanks, Des
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel
Hi Des,
Thank you for your patch. It's very useful so that I've forked a version of Hunchentoot maintained by Andrey (archimag) on github and apply it. Hope it would be integrated into Hunchentoot's main development branch.
All the best, Yang
On Sun, Mar 20, 2011 at 10:33 AM, Desmond O. Chang dochang@gmail.com wrote:
After stopping an acceptor with STOP, one can't start it again with START, because the START method doesn't reset the value of acceptor-shutdown-p to NIL, so the listener returns/quits instantly.
Also, the default value of ACCEPTOR-SHUTDOWN-P should be T, because every acceptor should be closed when it is created.
I've committed this change. It has been overlooked when it was first submitted.
Thanks, Hans
See [1] & [2] for details.
[1] http://article.gmane.org/gmane.lisp.lib.tbnl.general/2469 [2] http://article.gmane.org/gmane.lisp.lib.tbnl.general/2868
acceptor.lisp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/acceptor.lisp b/acceptor.lisp index ba90e2e..168c9b9 100644 --- a/acceptor.lisp +++ b/acceptor.lisp @@ -120,7 +120,7 @@ connections.") :documentation "Number of pending connections allowed in the listen socket before the kernel rejects further incoming connections.")
- (acceptor-shutdown-p :initform nil
- (acceptor-shutdown-p :initform t
:accessor acceptor-shutdown-p :documentation "A flag that makes the acceptor shutdown itself when set to something other than NIL.") @@ -266,6 +266,7 @@ they're using secure connections - see the SSL-ACCEPTOR class.")) ;; general implementation
(defmethod start ((acceptor acceptor))
- (setf (acceptor-shutdown-p acceptor) nil)
(start-listening acceptor) (let ((taskmaster (acceptor-taskmaster acceptor))) (setf (taskmaster-acceptor taskmaster) acceptor) -- 1.7.4.1
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel