mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-28 11:51:53 +01:00
fix(task): revert to context based approach and fix tasks stuck, improve error handling
This commit is contained in:
@@ -99,6 +99,11 @@ func (r *StreamRoute) HealthMonitor() health.HealthMonitor {
|
||||
func (r *StreamRoute) acceptConnections() {
|
||||
defer r.task.Finish("listener closed")
|
||||
|
||||
go func() {
|
||||
<-r.task.Context().Done()
|
||||
r.Close()
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-r.task.Context().Done():
|
||||
|
||||
Reference in New Issue
Block a user