mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 15:45:39 +00:00
service.Run supports passing in context (#3504)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package sub
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"net"
|
||||
@@ -233,7 +234,7 @@ func startService(
|
||||
go handleSignal(svr, closedDoneCh)
|
||||
}
|
||||
|
||||
err = svr.Run()
|
||||
err = svr.Run(context.Background())
|
||||
if err == nil && shouldGracefulClose {
|
||||
<-closedDoneCh
|
||||
}
|
||||
|
Reference in New Issue
Block a user