if {$executing} {
puts "<* $m"
set myconn $currentconn
- trapping xmit-only-noreport $currentconn +$m
+ if {[string length $currentconn]} {
+ trapping xmit-only-noreport $currentconn +$m
+ }
set othersm -$m
} else {
puts "<& $m"
#---------- error handling ----------
proc kill-conn {conn msg} {
- global conns queueing
+ global conns queueing currentconn
upvar #0 c/$conn c
catch { unset conns($conn) } ;# do this first to stop any recursion
+ if {[info exists currentconn]} {
+ if {![string compare $currentconn $conn]} { set currentconn {} }
+ }
puts "<$conn\$ closing : $msg"
if {[string length $msg]} { catch { xmit-only-always $conn "$msg" } }
catch { close $conn }