1
0
Fork 0
forked from External/ergo

Merge pull request #236 from slingamn/socket_again.1

eliminate dedicated RunSocketWriter goroutine
This commit is contained in:
Daniel Oaks 2018-04-23 02:07:43 +10:00 committed by GitHub
commit 8f22d5ffd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 70 additions and 34 deletions

View file

@ -90,7 +90,6 @@ func NewClient(server *Server, conn net.Conn, isTLS bool) *Client {
limits := server.Limits()
fullLineLenLimit := limits.LineLen.Tags + limits.LineLen.Rest
socket := NewSocket(conn, fullLineLenLimit*2, server.MaxSendQBytes())
go socket.RunSocketWriter()
client := &Client{
atime: now,
authorized: server.Password() == nil,
@ -101,7 +100,7 @@ func NewClient(server *Server, conn net.Conn, isTLS bool) *Client {
ctime: now,
flags: make(map[modes.Mode]bool),
server: server,
socket: &socket,
socket: socket,
nick: "*", // * is used until actual nick is given
nickCasefolded: "*",
nickMaskString: "*", // * is used until actual nick is given