Skip to content

Commit

Permalink
Don't get/set static paths for stopped app
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Nov 30, 2018
1 parent bc7a061 commit 7bf3d73
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,31 @@ Server <- R6Class("Server",
private$running
},
getStaticPaths = function() {
if (!private$running) return(NULL)

getStaticPaths_(private$handle)
},
setStaticPath = function(..., .list = NULL) {
if (!private$running) return(invisible())

paths <- c(list(...), .list)
paths <- normalizeStaticPaths(paths)
invisible(setStaticPaths_(private$handle, paths))
},
removeStaticPath = function(path) {
if (!private$running) return(invisible())

path <- as.character(path)
invisible(removeStaticPaths_(private$handle, path))
},
getStaticPathOptions = function() {
if (!private$running) return(NULL)

getStaticPathOptions_(private$handle)
},
setStaticPathOption = function(..., .list = NULL) {
if (!private$running) return(invisible())

opts <- c(list(...), .list)
opts <- drop_duplicate_names(opts)
opts <- normalizeStaticPathOptions(opts)
Expand Down

0 comments on commit 7bf3d73

Please sign in to comment.