Browse Source

bump irc-go to fix buffering issue

tags/v2.6.0-rc1
Shivaram Lingamneni 3 years ago
parent
commit
992a09dc90
4 changed files with 10 additions and 4 deletions
  1. 1
    1
      go.mod
  2. 2
    0
      go.sum
  3. 6
    2
      vendor/github.com/goshuirc/irc-go/ircreader/ircreader.go
  4. 1
    1
      vendor/modules.txt

+ 1
- 1
go.mod View File

@@ -10,7 +10,7 @@ require (
10 10
 	github.com/go-sql-driver/mysql v1.5.0
11 11
 	github.com/go-test/deep v1.0.6 // indirect
12 12
 	github.com/gorilla/websocket v1.4.2
13
-	github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed
13
+	github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847
14 14
 	github.com/onsi/ginkgo v1.12.0 // indirect
15 15
 	github.com/onsi/gomega v1.9.0 // indirect
16 16
 	github.com/oragono/confusables v0.0.0-20201108231250-4ab98ab61fb1

+ 2
- 0
go.sum View File

@@ -38,6 +38,8 @@ github.com/goshuirc/irc-go v0.0.0-20210222010959-6e139f6c42e9 h1:A1mSQ0N5Kx8i+ae
38 38
 github.com/goshuirc/irc-go v0.0.0-20210222010959-6e139f6c42e9/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
39 39
 github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed h1:cwwqHrmLafgEucSMC9PmFOA671dc4bEZ5z6FsamnBY8=
40 40
 github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
41
+github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847 h1:MmsZRpAsMxyw0P5/SFn2L6edhmIXRlolgXvOF+fgEiQ=
42
+github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
41 43
 github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
42 44
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
43 45
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=

+ 6
- 2
vendor/github.com/goshuirc/irc-go/ircreader/ircreader.go View File

@@ -66,8 +66,12 @@ func (cc *IRCReader) ReadLine() ([]byte, error) {
66 66
 			return line, nil
67 67
 		}
68 68
 
69
-		if cc.start == 0 && len(cc.buf) == cc.maxSize {
70
-			return nil, ErrReadQ // out of space, can't expand or slide
69
+		// are we out of space? we can read more if any of these are true:
70
+		// 1. cc.start != 0, so we can slide the existing data back
71
+		// 2. cc.end < len(cc.buf), so we can read data into the end of the buffer
72
+		// 3. len(cc.buf) < cc.maxSize, so we can grow the buffer
73
+		if cc.start == 0 && cc.end == len(cc.buf) && len(cc.buf) == cc.maxSize {
74
+			return nil, ErrReadQ
71 75
 		}
72 76
 
73 77
 		if cc.eof {

+ 1
- 1
vendor/modules.txt View File

@@ -21,7 +21,7 @@ github.com/go-sql-driver/mysql
21 21
 # github.com/gorilla/websocket v1.4.2
22 22
 ## explicit
23 23
 github.com/gorilla/websocket
24
-# github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed
24
+# github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847
25 25
 ## explicit
26 26
 github.com/goshuirc/irc-go/ircfmt
27 27
 github.com/goshuirc/irc-go/ircmsg

Loading…
Cancel
Save