[hunchentoot-devel] [PATCH] handle ACCEPTOR-SHUTDOWN-P correctly

Hans Hübner hans.huebner at gmail.com
Mon Mar 21 05:18:46 UTC 2011


On Sun, Mar 20, 2011 at 10:33 AM, Desmond O. Chang <dochang at 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 at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>




More information about the Tbnl-devel mailing list