fix some linter warnings

This commit is contained in:
Lucas Clemente 2016-07-25 16:59:07 +02:00
parent 03bad0e86b
commit 6f657c02e4
2 changed files with 8 additions and 8 deletions

View file

@ -104,8 +104,8 @@ var _ = Describe("Server", func() {
go func() {
defer GinkgoRecover()
err := server.Serve(serverConn)
Expect(err).ToNot(HaveOccurred())
err2 := server.Serve(serverConn)
Expect(err2).ToNot(HaveOccurred())
close(done)
}()
@ -143,8 +143,8 @@ var _ = Describe("Server", func() {
go func() {
defer GinkgoRecover()
err := server.Serve(serverConn)
Expect(err).ToNot(HaveOccurred())
err2 := server.Serve(serverConn)
Expect(err2).ToNot(HaveOccurred())
close(done)
}()

View file

@ -528,8 +528,8 @@ var _ = Describe("Session", func() {
Expect(err).NotTo(HaveOccurred())
go session.run()
go func() {
_, err := s1.Write([]byte("foobar1"))
Expect(err).NotTo(HaveOccurred())
_, err2 := s1.Write([]byte("foobar1"))
Expect(err2).NotTo(HaveOccurred())
}()
_, err = s2.Write([]byte("foobar2"))
Expect(err).NotTo(HaveOccurred())
@ -557,8 +557,8 @@ var _ = Describe("Session", func() {
go session.run()
go func() {
defer GinkgoRecover()
_, err := s1.Write(bytes.Repeat([]byte{'e'}, int(protocol.SmallPacketPayloadSizeThreshold+50)))
Expect(err).ToNot(HaveOccurred())
_, err2 := s1.Write(bytes.Repeat([]byte{'e'}, int(protocol.SmallPacketPayloadSizeThreshold+50)))
Expect(err2).ToNot(HaveOccurred())
}()
_, err = s2.Write(bytes.Repeat([]byte{'e'}, int(protocol.SmallPacketPayloadSizeThreshold+50)))
Expect(err).ToNot(HaveOccurred())