R/app_exit.R

Defines functions app_exit

app_exit <- function(session, db) {
  session$onSessionEnded(function() {
    stopApp()
    message("killing R process on exit")
    if(is.null(db)){return()}else{RMySQL::dbDisconnect(db)}
  })
}
JARS3N/LiveLongAndProsper documentation built on June 21, 2020, 12:49 p.m.