diff --git a/daemon/handle_mock.go b/daemon/handle_mock.go index 96ae419..de63414 100644 --- a/daemon/handle_mock.go +++ b/daemon/handle_mock.go @@ -90,9 +90,12 @@ func (ws *WiretapService) handleMockRequest( // if the mock is empty request.HttpResponseWriter.WriteHeader(mockStatus) + if mock == nil { + return + } + _, errs := request.HttpResponseWriter.Write(mock) if errs != nil { panic(errs) } - return }