Add automatic reconnect
This commit is contained in:
parent
a0409fa8f1
commit
fb7dbfd17b
1
irc.go
1
irc.go
@ -30,7 +30,6 @@ func reader(irc *IRCConnection) {
|
|||||||
func writer(irc *IRCConnection) {
|
func writer(irc *IRCConnection) {
|
||||||
for {
|
for {
|
||||||
b := strings.Bytes(<-irc.pwrite);
|
b := strings.Bytes(<-irc.pwrite);
|
||||||
fmt.Printf("-->%s", b);
|
|
||||||
_, err := irc.socket.Write(b);
|
_, err := irc.socket.Write(b);
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("%s\n", err);
|
fmt.Printf("%s\n", err);
|
||||||
|
Loading…
Reference in New Issue
Block a user