mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 07:09:12 +01:00
fix verbose mode panic with tui log capture (#174)
This commit is contained in:
parent
2a2a64f513
commit
54476d2cd1
@ -181,7 +181,7 @@ func (m *accessModel) Write(p []byte) (n int, err error) {
|
||||
lines := strings.Split(in, "\n")
|
||||
for _, line := range lines {
|
||||
cleanLine := strings.ReplaceAll(line, "\n", "")
|
||||
if cleanLine != "" {
|
||||
if cleanLine != "" && m.prg != nil {
|
||||
m.prg.Send(accessLogLine(cleanLine))
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ func (m *shareModel) Write(p []byte) (n int, err error) {
|
||||
lines := strings.Split(in, "\n")
|
||||
for _, line := range lines {
|
||||
cleanLine := strings.ReplaceAll(line, "\n", "")
|
||||
if cleanLine != "" {
|
||||
if cleanLine != "" && m.prg != nil {
|
||||
m.prg.Send(shareLogLine(cleanLine))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user