mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
don't async buffer flushing
This commit is contained in:
parent
78b787f3ae
commit
142bf3d3bb
@ -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)
|
||||
|
||||
|
@ -74,14 +74,12 @@ func (socket *Socket) Write(line string) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
go socket.flush()
|
||||
|
||||
Log.debug.Printf("%s ← %s", socket, line)
|
||||
if err = socket.writer.Flush(); socket.isError(err, W) {
|
||||
return
|
||||
}
|
||||
|
||||
func (socket *Socket) flush() {
|
||||
socket.isError(socket.writer.Flush(), W)
|
||||
Log.debug.Printf("%s ← %s", socket, line)
|
||||
return
|
||||
}
|
||||
|
||||
func (socket *Socket) isError(err error, dir rune) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user