Daniel blog

Yeah think so, it;'s not that ns_conn isconnected doesn't work but that we
were misusing it.

On 8 December 2014 at 12:53, Bernhard van Woerden <notifications@github.com>
wrote:

> In tcl/return.tcl:
>
> > @@ -21,18 +21,23 @@ proc qc::return2client { args } {
> >      } else {
> >  	error "No payload given in html or xml or text or json"
> >      }
> > -    default code 200
> > -    default filter_cc no
> > -    if { $filter_cc } {
> > -	# mask credit card numbers
> > -	set $var [qc::format_cc_masked_string [set $var]]
> > -    }
> > -    # Other headers
> > -    foreach name [lexclude $arg_names html xml text json code content-type] {
> > -    	set headers [ns_conn outputheaders]
> > -	ns_set update $headers $name [set $name]
> > +    if { ![ns_conn isconnected] } {
>
> Sounds like ns_conn isconnected is more limited. Does it just tell us
> that we are in a connection thread as opposed to a thread used for
> scheduled tasks etc.
>
> Our use of ns_conn flags actually tells us if the TCP socket has been
> closed.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/qcode-software/qcode-tcl/pull/112/files#r21450331>.
>



-- 
Kind Regards,
Daniel Clark
Qcode Software Limited
www.qcode.co.uk
Tel: +44(0) 1463 896 482