Skip to content

Conversation

@unsuman
Copy link
Contributor

@unsuman unsuman commented Aug 14, 2025

Fixes #3828

Now the server shuts down if no client gets connected within 60s.

Comment on lines 112 to 113
if err := server.Serve(listener); err != nil {
logger.Infof("Server stopped: %v", err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to handle ErrServerStopped separately:

Suggested change
if err := server.Serve(listener); err != nil {
logger.Infof("Server stopped: %v", err)
if err := server.Serve(listener); err != nil {
if errors.Is(err, grpc.ErrServerStopped) {
logger.Errorf("Server stopped: %v", err)
} else {
logger.Errorf("Failed to serve: %v", err)
}
}

https://github.com/grpc/grpc-go/blob/e9e00cb28e350d6440145d883d1d6cf675f3c0f3/server.go#L877

@unsuman unsuman force-pushed the fix/ext-driver-shutdown branch from 9352aa3 to 8cf209d Compare August 15, 2025 20:06
@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Aug 18, 2025
@AkihiroSuda AkihiroSuda added the gsoc/2025 Google Summer of Code 2025 label Aug 18, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit b25aa0e into lima-vm:master Aug 18, 2025
61 of 63 checks passed
@AkihiroSuda AkihiroSuda added the area/vmdrivers VM driver infrastructure label Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/vmdrivers VM driver infrastructure gsoc/2025 Google Summer of Code 2025

Projects

None yet

Development

Successfully merging this pull request may close these issues.

External driver doesn’t exit after client disconnect

3 participants