mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-23 03:02:48 +01:00
don't async buffer flushing
This commit is contained in:
parent
78b787f3ae
commit
142bf3d3bb
@ -1,7 +1,7 @@
|
|||||||
package irc
|
package irc
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SEM_VER = "ergonomadic-1.4.1"
|
SEM_VER = "ergonomadic-1.4.2"
|
||||||
CRLF = "\r\n"
|
CRLF = "\r\n"
|
||||||
MAX_REPLY_LEN = 512 - len(CRLF)
|
MAX_REPLY_LEN = 512 - len(CRLF)
|
||||||
|
|
||||||
|
@ -74,14 +74,12 @@ func (socket *Socket) Write(line string) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
go socket.flush()
|
if err = socket.writer.Flush(); socket.isError(err, W) {
|
||||||
|
|
||||||
Log.debug.Printf("%s ← %s", socket, line)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (socket *Socket) flush() {
|
Log.debug.Printf("%s ← %s", socket, line)
|
||||||
socket.isError(socket.writer.Flush(), W)
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (socket *Socket) isError(err error, dir rune) bool {
|
func (socket *Socket) isError(err error, dir rune) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user