mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
run ineffassign in gometalinter
This commit is contained in:
parent
548916e902
commit
37aa577560
5 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
"vendor"
|
"vendor"
|
||||||
],
|
],
|
||||||
"Enable": [
|
"Enable": [
|
||||||
|
"ineffassign",
|
||||||
"vet"
|
"vet"
|
||||||
],
|
],
|
||||||
"Linters": {
|
"Linters": {
|
||||||
|
|
|
@ -97,7 +97,7 @@ var _ = Describe("Connection Flow controller", func() {
|
||||||
Expect(newlyBlocked).To(BeFalse())
|
Expect(newlyBlocked).To(BeFalse())
|
||||||
controller.UpdateSendWindow(150)
|
controller.UpdateSendWindow(150)
|
||||||
controller.AddBytesSent(150)
|
controller.AddBytesSent(150)
|
||||||
newlyBlocked, offset = controller.IsNewlyBlocked()
|
newlyBlocked, _ = controller.IsNewlyBlocked()
|
||||||
Expect(newlyBlocked).To(BeTrue())
|
Expect(newlyBlocked).To(BeTrue())
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -92,6 +92,7 @@ var _ = Describe("Packing and unpacking Initial packets", func() {
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
payloadStartIndex := buf.Len()
|
payloadStartIndex := buf.Len()
|
||||||
aeadCl, err := crypto.NewNullAEAD(protocol.PerspectiveClient, connID, ver)
|
aeadCl, err := crypto.NewNullAEAD(protocol.PerspectiveClient, connID, ver)
|
||||||
|
Expect(err).ToNot(HaveOccurred())
|
||||||
for _, f := range frames {
|
for _, f := range frames {
|
||||||
err := f.Write(buf, ver)
|
err := f.Write(buf, ver)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
|
@ -124,6 +124,7 @@ var _ = Describe("Send Stream", func() {
|
||||||
}()
|
}()
|
||||||
waitForWrite()
|
waitForWrite()
|
||||||
frame, hasMoreData := str.popStreamFrame(50)
|
frame, hasMoreData := str.popStreamFrame(50)
|
||||||
|
Expect(frame).ToNot(BeNil())
|
||||||
Expect(hasMoreData).To(BeTrue())
|
Expect(hasMoreData).To(BeTrue())
|
||||||
frame, hasMoreData = str.popStreamFrame(1000)
|
frame, hasMoreData = str.popStreamFrame(1000)
|
||||||
Expect(frame).ToNot(BeNil())
|
Expect(frame).ToNot(BeNil())
|
||||||
|
|
|
@ -392,6 +392,7 @@ var _ = Describe("Server", func() {
|
||||||
|
|
||||||
It("ignores public resets for known connections", func() {
|
It("ignores public resets for known connections", func() {
|
||||||
err := serv.handlePacket(nil, nil, firstPacket)
|
err := serv.handlePacket(nil, nil, firstPacket)
|
||||||
|
Expect(err).ToNot(HaveOccurred())
|
||||||
Expect(serv.sessions).To(HaveLen(1))
|
Expect(serv.sessions).To(HaveLen(1))
|
||||||
Expect(serv.sessions[connID].(*mockSession).packetCount).To(Equal(1))
|
Expect(serv.sessions[connID].(*mockSession).packetCount).To(Equal(1))
|
||||||
err = serv.handlePacket(nil, nil, wire.WritePublicReset(connID, 1, 1337))
|
err = serv.handlePacket(nil, nil, wire.WritePublicReset(connID, 1, 1337))
|
||||||
|
@ -402,6 +403,7 @@ var _ = Describe("Server", func() {
|
||||||
|
|
||||||
It("ignores invalid public resets for known connections", func() {
|
It("ignores invalid public resets for known connections", func() {
|
||||||
err := serv.handlePacket(nil, nil, firstPacket)
|
err := serv.handlePacket(nil, nil, firstPacket)
|
||||||
|
Expect(err).ToNot(HaveOccurred())
|
||||||
Expect(serv.sessions).To(HaveLen(1))
|
Expect(serv.sessions).To(HaveLen(1))
|
||||||
Expect(serv.sessions[connID].(*mockSession).packetCount).To(Equal(1))
|
Expect(serv.sessions[connID].(*mockSession).packetCount).To(Equal(1))
|
||||||
data := wire.WritePublicReset(connID, 1, 1337)
|
data := wire.WritePublicReset(connID, 1, 1337)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue