Skip to content

Commit

Permalink
Expose request timeout `dape-timeout' as per request #67
Browse files Browse the repository at this point in the history
  • Loading branch information
svaante committed Feb 12, 2024
1 parent ad1f2a2 commit 3cd8d42
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions dape.el
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,10 @@ The hook is run with one argument, the compilation buffer."
"Print debug info in *dape-repl* and *dape-connection events*."
:type 'boolean)

(defcustom dape-request-timeout jsonrpc-default-request-timeout
"Number of seconds until a request is deemed to be timed out."
:type 'natnum)


;;; Face
(defface dape-breakpoint-face
Expand Down Expand Up @@ -1160,8 +1164,14 @@ and success. See `dape--callback' for signature."
(when (functionp cb)
(lambda ()
(dape--repl-message
(format "* Command %s timeout *" command) 'dape-repl-error-face)
(funcall cb conn nil "timeout")))))
(format
"* Command %s timed out after %d seconds, the \
timeout period is configurable with `dape-request-timeout' *"
command
dape-request-timeout)
'dape-repl-error-face)
(funcall cb conn nil "timeout")))
:timeout dape-request-timeout))

(defun dape--initialize (conn)
"Initialize and launch/attach adapter CONN."
Expand Down

0 comments on commit 3cd8d42

Please sign in to comment.