Skip to content

Commit

Permalink
fix: wait longer for the gpg client before aborting
Browse files Browse the repository at this point in the history
It can take a while to decrypt the fallback keys if e.g. a password must
be entered.
  • Loading branch information
smlx committed Aug 4, 2021
1 parent fffa169 commit 3be1b9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/server/gpg.go
Expand Up @@ -121,8 +121,8 @@ func (g *GPG) Serve(ctx context.Context, l net.Listener, exit *time.Ticker,
}
// reset the exit timer
exit.Reset(timeout)
// if the client stops responding for 16 seconds, give up.
if err := conn.SetDeadline(time.Now().Add(16 * time.Second)); err != nil {
// if the client stops responding for 60 seconds, give up.
if err := conn.SetDeadline(time.Now().Add(60 * time.Second)); err != nil {
return fmt.Errorf("couldn't set deadline: %v", err)
}
// init protocol state machine
Expand Down

0 comments on commit 3be1b9b

Please sign in to comment.