mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-01-03 02:14:25 +00:00
Fix type assertion error in Remove method
Co-authored-by: warkanum <208308+warkanum@users.noreply.github.com>
This commit is contained in:
@@ -220,8 +220,8 @@ func (sm *serverManager) Remove(name string) error {
|
|||||||
// Stop the server if it's running. Prefer the server's configured shutdownTimeout
|
// Stop the server if it's running. Prefer the server's configured shutdownTimeout
|
||||||
// when available, and fall back to a sensible default.
|
// when available, and fall back to a sensible default.
|
||||||
timeout := 10 * time.Second
|
timeout := 10 * time.Second
|
||||||
if gs, ok := instance.(*gracefulServer); ok && gs.shutdownTimeout > 0 {
|
if si, ok := instance.(*serverInstance); ok && si.gracefulServer != nil && si.gracefulServer.shutdownTimeout > 0 {
|
||||||
timeout = gs.shutdownTimeout
|
timeout = si.gracefulServer.shutdownTimeout
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||||
|
|||||||
Reference in New Issue
Block a user