Skip to content

Commit

Permalink
Fix a bug where the URL becomes an empty string (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-persson authored Nov 21, 2023
1 parent 412659f commit 02d279c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/sse/v1/sse.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package sse
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -183,6 +184,9 @@ func (h SSEHandler) url(ctx context.Context, identifier string) (string, error)
if err != nil {
return "", err
}
if url == "" {
return "", errors.New("esr has not started yet")
}
return fmt.Sprintf("http://%s:8000/v1/log", url), nil
}

Expand Down

0 comments on commit 02d279c

Please sign in to comment.