projects
/
Bullfrog
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e0d1e4
)
Handle socket connection failures properly
author
Pat Thoyts
<patthoyts@users.sourceforge.net>
Sun, 14 Feb 2010 02:04:37 +0000
(
02:04
+0000)
committer
Pat Thoyts
<patthoyts@users.sourceforge.net>
Sun, 14 Feb 2010 02:04:37 +0000
(
02:04
+0000)
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
lib/irc/picoirc.tcl
patch
|
blob
|
history
diff --git
a/lib/irc/picoirc.tcl
b/lib/irc/picoirc.tcl
index c6429aac98dc9a981e0cacc6e2242a256a3453d3..86c0dad02463854bee94a3cfc9e2c519cac1f1dc 100644
(file)
--- a/
lib/irc/picoirc.tcl
+++ b/
lib/irc/picoirc.tcl
@@
-118,6
+118,11
@@
proc ::picoirc::SocksConnect {context} {
global tcl_platform
upvar #0 $context irc
fileevent $irc(socket) writable {}
+ if {[set err [fconfigure $irc(socket) -error]] ne ""} {
+ Callback $context close $err
+ catch {close $irc(socket)}
+ return
+ }
socks5::init $irc(socket) $irc(server) $irc(port) \
-username $tcl_platform(user) \
-command [list [namespace origin SocksConnected] $context]