Open riking opened 5 years ago
@riking the defer
clause should be placed after the if
block, the correct code may looks like below:
conn, err := NewDialer(server.URL)
if err != nil {
t.Error(err)
return false
}
defer conn.Close()
A good luck to you if it can solve the problem.
This pattern is repeated several times in melody_test.go:
However, if there is an error, this is liable to cause a null reference panic.