mirror of
https://github.com/containers/podman.git
synced 2025-12-03 03:39:44 +08:00
podman-varlink: log timeouts
The default timeout of one second when using podman-varlink can confuse users as podman exits in silence after this timeout in case no connection to the endpoint is alive. Print a log (info level) that the varlink service has expired to guide the user. This change requires to vendor in the latest master of varlink/go. Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #899 Approved by: rhatdan
This commit is contained in:
committed by
Atomic Bot
parent
03cf4ac60a
commit
7965bf5404
9
vendor/github.com/varlink/go/varlink/service.go
generated
vendored
9
vendor/github.com/varlink/go/varlink/service.go
generated
vendored
@@ -51,6 +51,13 @@ type Service struct {
|
||||
address string
|
||||
}
|
||||
|
||||
// ServiceTimoutError helps API users to special-case timeouts.
|
||||
type ServiceTimeoutError struct {}
|
||||
|
||||
func (ServiceTimeoutError) Error() string {
|
||||
return "service timeout"
|
||||
}
|
||||
|
||||
func (s *Service) getInfo(c Call) error {
|
||||
return c.replyGetInfo(s.vendor, s.product, s.version, s.url, s.names)
|
||||
}
|
||||
@@ -297,7 +304,7 @@ func (s *Service) Listen(address string, timeout time.Duration) error {
|
||||
s.mutex.Lock()
|
||||
if s.conncounter == 0 {
|
||||
s.mutex.Unlock()
|
||||
return nil
|
||||
return ServiceTimeoutError{}
|
||||
}
|
||||
s.mutex.Unlock()
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user