Add automatic reconnect

This commit is contained in:
tj 2009-11-25 20:22:06 +01:00
parent db5f5bd9fa
commit a0409fa8f1

4
irc.go
View File

@ -30,7 +30,7 @@ func reader(irc *IRCConnection) {
func writer(irc *IRCConnection) {
for {
b := strings.Bytes(<-irc.pwrite);
fmt.Printf("-->%s",b );
fmt.Printf("-->%s", b);
_, err := irc.socket.Write(b);
if err != nil {
fmt.Printf("%s\n", err);
@ -45,7 +45,7 @@ func reconnector(i *IRCConnection) {
for {
i.Error = connect(i);
if i.Error == nil {
return;
return
}
}
}