Skip to content

Commit 02d279c

Browse files
authored
Fix a bug where the URL becomes an empty string (#47)
1 parent 412659f commit 02d279c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/sse/v1/sse.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package sse
1818
import (
1919
"bufio"
2020
"context"
21+
"errors"
2122
"fmt"
2223
"io"
2324
"net/http"
@@ -183,6 +184,9 @@ func (h SSEHandler) url(ctx context.Context, identifier string) (string, error)
183184
if err != nil {
184185
return "", err
185186
}
187+
if url == "" {
188+
return "", errors.New("esr has not started yet")
189+
}
186190
return fmt.Sprintf("http://%s:8000/v1/log", url), nil
187191
}
188192

0 commit comments

Comments
 (0)