fix: only close user/agentIo connect channel once (#21)

This commit is contained in:
UUBulb
2024-11-26 09:18:13 +08:00
committed by GitHub
parent 45f11483ec
commit 07989705d2
3 changed files with 18 additions and 4 deletions

View File

@@ -95,5 +95,9 @@ func terminalStream(c *gin.Context) (any, error) {
return nil, newWsError("%v", err)
}
return nil, newWsError("%v", rpc.NezhaHandlerSingleton.StartStream(streamId, time.Second*10))
if err = rpc.NezhaHandlerSingleton.StartStream(streamId, time.Second*10); err != nil {
return nil, newWsError("%v", err)
}
return nil, newWsError("")
}