[Rd] closeAllConnections fails with socketConnection (PR#11396)

steve at revolution-computing.com steve at revolution-computing.com
Wed May 7 19:35:08 CEST 2008


Full_Name: Stephen Weston
Version: 2.7.0
OS: darwin8.10.1
Submission from: (NULL) (75.56.13.246)


If a socketConnection is created in an R session, and you call
closeAllConnections to close it, you get the following error:

> x <- socketConnection("localhost", 80)
> closeAllConnections()
Error in socket$socket : $ operator is invalid for atomic vectors

You get the same error message if you try to quit, saving the
workspace image.

I also noticed that getConnection returns an object that has a
different class than the original socket connection object:

> class(x)
[1] "sockconn"   "connection"
> class(getConnection(3))
[1] "socket"     "connection"

My version information is:
> version
               _                           
platform       i386-apple-darwin8.10.1     
arch           i386                        
os             darwin8.10.1                
system         i386, darwin8.10.1          
status                                     
major          2                           
minor          7.0                         
year           2008                        
month          04                          
day            22                          
svn rev        45424                       
language       R                           
version.string R version 2.7.0 (2008-04-22)

My session information is:
> sessionInfo()
R version 2.7.0 (2008-04-22) 
i386-apple-darwin8.10.1 

locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base



More information about the R-devel mailing list