Fix lint errors

pion/webrtc#712
This commit is contained in:
Yutaka Takeda
2019-07-15 01:00:21 -07:00
parent b3e05469f0
commit c316a9f7b3
2 changed files with 4 additions and 7 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ func NewCandidateRelay(config *CandidateRelayConfig) (*CandidateRelay, error) {
func (c *CandidateRelay) close() error {
err := c.candidateBase.close()
if c.onClose != nil {
c.onClose()
err = c.onClose()
c.onClose = nil
}
return err
+3 -6
View File
@@ -21,8 +21,8 @@ type virtualNet struct {
}
func (v *virtualNet) close() {
v.server.Close() // nolint:errcheck
v.wan.Stop()
v.server.Close() // nolint:errcheck,gosec
v.wan.Stop() // nolint:errcheck,gosec
}
func buildVNet(natType *vnet.NATType) (*virtualNet, error) {
@@ -250,10 +250,7 @@ func closePipe(t *testing.T, ca *Conn, cb *Conn) bool {
return false
}
err = cb.Close()
if !assert.NoError(t, err, "should succeed") {
return false
}
return true
return assert.NoError(t, err, "should succeed")
}
func TestConnectivityVNet(t *testing.T) {