Deal gracefully with R websocket close
Deal gracefully with R websocket close

Before httpuv we would not receive wsClient.onclose event during graceful
session end (i.e. browser reload). I believe this may be because the
websockets package did not send a close frame back to the client when one
is received, whereas httpuv does. To detect when a close is graceful, we
see if the sockjs connection has already closed. Without this check, the
appWorkerHandle (which is already null) is accessed which causes the
nodejs process to exit.

joequant/shiny-server,joequant/shiny-server,nvoron23/shiny-server,nvoron23/shiny-server,githubfun/shiny-server,sneumann/shiny-server,trestletech/shiny-server,ekergy/shiny-ekergy,dpryan79/shiny-server,joequant/shiny-server,nvoron23/shiny-server,sneumann/shiny-server,nvoron23/shiny-server,dpryan79/shiny-server,sneumann/shiny-server,dpryan79/shiny-server,joequant/shiny-server,ekergy/shiny-ekergy,nvoron23/shiny-server,joequant/shiny-server,trestletech/shiny-server,githubfun/shiny-server,githubfun/shiny-server,githubfun/shiny-server,ekergy/shiny-ekergy,sneumann/shiny-server,trestletech/shiny-server,sneumann/shiny-server,nvoron23/shiny-server,githubfun/shiny-server,trestletech/shiny-server,ekergy/shiny-ekergy,sneumann/shiny-server,ekergy/shiny-ekergy,joequant/shiny-server,joequant/shiny-server,ekergy/shiny-ekergy,dpryan79/shiny-server,dpryan79/shiny-server,trestletech/shiny-server,githubfun/shiny-server,ekergy/shiny-ekergy,dpryan79/shiny-server,sneumann/shiny-server,githubfun/shiny-server,trestletech/shiny-server,dpryan79/shiny-server