bwlewis / rredis

R client for Redis
http://illposed.net/
93 stars 25 forks source link

writeBin() causes "can only write to a binary connection" error #37

Open ttdtrang opened 7 years ago

ttdtrang commented 7 years ago

I encountered this error caused by this line in redis-internal.R

writeBin(.raw(hdr), con)

which is supposedly thrown if con is not binary, and not NULL either. I don't see any how it can happen, looking through the code of rredis.

And in fact, when I call rredis::redisGet locally there was no issue. Yet the error popped out for all the calls via OpenCPU.

It took me quite a while and still have no clue how or where con can become a non-binary connection. I don't think it is the problem of either rredis or OpenCPU. I must have missed some very basic thing...