diff --git a/go.mod b/go.mod index a96a5df1..7cbd5be2 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-sql-driver/mysql v1.5.0 github.com/go-test/deep v1.0.6 // indirect github.com/gorilla/websocket v1.4.2 - github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed + github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847 github.com/onsi/ginkgo v1.12.0 // indirect github.com/onsi/gomega v1.9.0 // indirect github.com/oragono/confusables v0.0.0-20201108231250-4ab98ab61fb1 diff --git a/go.sum b/go.sum index 00278a1f..bc668c8c 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,8 @@ github.com/goshuirc/irc-go v0.0.0-20210222010959-6e139f6c42e9 h1:A1mSQ0N5Kx8i+ae github.com/goshuirc/irc-go v0.0.0-20210222010959-6e139f6c42e9/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug= github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed h1:cwwqHrmLafgEucSMC9PmFOA671dc4bEZ5z6FsamnBY8= github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug= +github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847 h1:MmsZRpAsMxyw0P5/SFn2L6edhmIXRlolgXvOF+fgEiQ= +github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= diff --git a/vendor/github.com/goshuirc/irc-go/ircreader/ircreader.go b/vendor/github.com/goshuirc/irc-go/ircreader/ircreader.go index 7e019b53..4411fac0 100644 --- a/vendor/github.com/goshuirc/irc-go/ircreader/ircreader.go +++ b/vendor/github.com/goshuirc/irc-go/ircreader/ircreader.go @@ -66,8 +66,12 @@ func (cc *IRCReader) ReadLine() ([]byte, error) { return line, nil } - if cc.start == 0 && len(cc.buf) == cc.maxSize { - return nil, ErrReadQ // out of space, can't expand or slide + // are we out of space? we can read more if any of these are true: + // 1. cc.start != 0, so we can slide the existing data back + // 2. cc.end < len(cc.buf), so we can read data into the end of the buffer + // 3. len(cc.buf) < cc.maxSize, so we can grow the buffer + if cc.start == 0 && cc.end == len(cc.buf) && len(cc.buf) == cc.maxSize { + return nil, ErrReadQ } if cc.eof { diff --git a/vendor/modules.txt b/vendor/modules.txt index fdcb2ba3..9c0e9681 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -21,7 +21,7 @@ github.com/go-sql-driver/mysql # github.com/gorilla/websocket v1.4.2 ## explicit github.com/gorilla/websocket -# github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed +# github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847 ## explicit github.com/goshuirc/irc-go/ircfmt github.com/goshuirc/irc-go/ircmsg