Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what if a user carelessly closed all connections? #23

Closed
yihui opened this issue Oct 30, 2012 · 2 comments
Closed

what if a user carelessly closed all connections? #23

yihui opened this issue Oct 30, 2012 · 2 comments

Comments

@yihui
Copy link
Collaborator

yihui commented Oct 30, 2012

e.g.

library(evaluate)
evaluate('
1+1
closeAllConnections()
2+2
')
Error in isIncomplete(con) : invalid connection
Warning in sink() : no sink to remove
Error in close.connection(con) : invalid connection

dkahle/ggmap#9 was one example.

Is there way to prevent the connection in evaluate from being closed? https://github.com/hadley/evaluate/blob/master/R/watcher.r#L11

@hadley
Copy link
Member

hadley commented Nov 4, 2012

Hmmmm. I guess we could detect that with the parser and at least a more informative error message?

@yihui
Copy link
Collaborator Author

yihui commented Nov 4, 2012

That might be the only thing we can do, since there is no way to recover a connection after it is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants