From 0372b3250dfa90d53f30e6df1916f2969b78df16 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 11 Apr 2014 17:17:01 +0100 Subject: [PATCH] topicedit: add a timeout; better error handling --- topicedit.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/topicedit.tcl b/topicedit.tcl index 9fc4765..8899878 100755 --- a/topicedit.tcl +++ b/topicedit.tcl @@ -9,9 +9,11 @@ manyset $argv host port nick ident ownfullname channel topicinfo set done 0 +after 30000 { set errorInfo {}; bgerror timeout } + proc bgerror {msg} { global errorInfo errorCode - puts stderr "$msg\n$errorCode\n$errorInfo\n" + puts stderr "$msg\n$errorCode\n$errorInfo\n\nERROR: $msg\n" exit 16 } -- 2.30.2