diff --git a/rcon_mockserver_test.go b/rcon_mockserver_test.go index 7d67153..a1e84dc 100644 --- a/rcon_mockserver_test.go +++ b/rcon_mockserver_test.go @@ -155,11 +155,7 @@ func (s *MockServer) handle(conn net.Conn) { responseBody = request.Body() case "padding": - response := NewPacket(responseType, responseID, responseBody) - if err := s.writeWithInvalidPadding(conn, responseID, response); err != nil { - s.reportError(fmt.Errorf("handle write response error: %s", err)) - } - + _ = s.writeWithInvalidPadding(conn, responseID, NewPacket(responseType, responseID, responseBody)) return default: responseBody = "unknown command" diff --git a/rcon_test.go b/rcon_test.go index 9bce004..5033ab8 100644 --- a/rcon_test.go +++ b/rcon_test.go @@ -1,14 +1,14 @@ package rcon import ( + "encoding/json" "fmt" "os" + "strings" "testing" "time" - "encoding/json" "github.com/stretchr/testify/assert" - "strings" ) func TestDial(t *testing.T) {