diff --git a/irc/constants.go b/irc/constants.go index 9125666a..cb604680 100644 --- a/irc/constants.go +++ b/irc/constants.go @@ -1,7 +1,7 @@ package irc const ( - SEM_VER = "ergonomadic-1.4.1" + SEM_VER = "ergonomadic-1.4.2" CRLF = "\r\n" MAX_REPLY_LEN = 512 - len(CRLF) diff --git a/irc/socket.go b/irc/socket.go index bee701e9..06a2be5a 100644 --- a/irc/socket.go +++ b/irc/socket.go @@ -74,16 +74,14 @@ func (socket *Socket) Write(line string) (err error) { return } - go socket.flush() + if err = socket.writer.Flush(); socket.isError(err, W) { + return + } Log.debug.Printf("%s ← %s", socket, line) return } -func (socket *Socket) flush() { - socket.isError(socket.writer.Flush(), W) -} - func (socket *Socket) isError(err error, dir rune) bool { if err != nil { if err != io.EOF {