Skip to content

Commit 88e7cf7

Browse files
committed
ok it was a bad one
1 parent b7c1fe4 commit 88e7cf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

application/backend/app/daemon/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ func CreateDaemonToHostStream(containerName string) {
8282
token := os.Getenv("ONLOGS_TOKEN")
8383
agent.SendLogMessage(token, containerName, strings.SplitN(createLogMessage(nil, host, containerName, "ONLOGS: Container listening started!"), " ", 2))
8484

85-
defer closeActiveStream(containerName)
8685
lastSleep := time.Now().Unix()
8786
for { // reading body
8887
logLine, get_string_error := reader.ReadString('\n') // TODO read bytes instead of strings
8988
if get_string_error != nil {
9089
agent.SendLogMessage(token, containerName, strings.SplitN(createLogMessage(nil, host, containerName, "ONLOGS: Container listening stopped! ("+get_string_error.Error()+")"), " ", 2))
90+
closeActiveStream(containerName)
9191
return
9292
}
9393

0 commit comments

Comments
 (0)