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

View file

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