Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Hello #1

Closed
gunzino opened this issue Oct 21, 2015 · 6 comments
Closed

Hello #1

gunzino opened this issue Oct 21, 2015 · 6 comments

Comments

@gunzino
Copy link

gunzino commented Oct 21, 2015

After testing all of the C++ Redis libs I've stayed with the yours one. :) Simple and powerfull!

However I have experience one problem - after client got disconnected from redis it is not possible to reconnect back to redis server. After calling connect() the application freeze.

@Cylix
Copy link
Owner

Cylix commented Oct 21, 2015

Thank you for the information.
I've quickly looked at this issue and it seems it is related to boost::asio io_service.
I'll develop a fix as soon as possible.

@gunzino
Copy link
Author

gunzino commented Oct 21, 2015

Thank you very much! :) Also I've experienced the application freeze on the first connection but only once.

Anyway got a question: Is it possible to send sync requests to redis ? thank you :)

@gunzino
Copy link
Author

gunzino commented Oct 21, 2015

Heya,

Idk why but the app freeze even if I publish smth to redis using:
redis_client->send({"PUBLISH" "PTP-CHAT-EXTERNAL" "asd"});

The message won't even reach redis and app freeze.

@Cylix
Copy link
Owner

Cylix commented Oct 23, 2015

Hi,

Could you provide me complete examples of what you've done to get these errors.
This would help me to reproduce these issues and to correct them.

@gunzino
Copy link
Author

gunzino commented Oct 23, 2015

I use 2 instances, one for subscribe and one for client.

  1. I connect both of the instances to Redis.
  2. I subscribe to 2 channels with proper callbacks.
  3. I use 2 functions with GET command which work properly
  4. One function use PUBLISH and this will cause freeze after calling 2-3 times - the publish command even does not reach Redis.

redis_client.send({"PUBLISH" "PTP-CHAT-EXTERNAL" "asd"});

Cylix added a commit that referenced this issue Nov 15, 2015
@Cylix
Copy link
Owner

Cylix commented Nov 15, 2015

Hi, thanks again for having take the time to open an issue.
I've been a little bit busy the past weeks, so I apologize for the time I've taken before inspecting this issue.

After working on it, I think the problem was caused by the run loop of the boost::asio io_service which was stopped to early. So, nothing was sent or received after the loop has been broken. I've added a boost::asio::io_service::worker to maintain the run loop alive.

In my tests, the issue seems to be solved with this modification. Could you please confirm it too?

@Cylix Cylix closed this as completed Jan 14, 2016
cmorse pushed a commit to cmorse/cpp_redis that referenced this issue Oct 18, 2017
* start port to windows. now compile but code need to be improve to ensure better separation between unix & windows parts. cpp_redis tests do not pass for now.

* reorganize repository to separate windows and unix code

* windows compilation after code reorganization

* small timeout on WSAPoll, use windows versions of POLLIN POLLOUt

* fix unix compilation & listen to PULLHUP event

* fix io_service causing idle when waiting for sockets to be removed. Set WSAPoll timeout to -1. Clean code

* unix compilation warning fix && clang-format

* port windows fix to unix (io_service idle / POLLHUP / ...)

* update cmakelist for windows cpp_redis integration

* fix Cmake warnings under unix (cpp_redis integration)

* install_deps update

* try fix travis

* try fix travis

* fix cmakelist

* fix cmakelist

* fix cmakelist
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants