-
Notifications
You must be signed in to change notification settings - Fork 52
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
Subscribing to more than 2 topics #34
Comments
it works when i put commands to browser(Chrome) we can use pubsub ls there are 4 topics all of them |
` string strChannelID = txtTopics.Text;
i test again and again it will not work if there are more than two topics |
Thanks for the bug report. I'll create some test multiple subscribes and get back to you. |
I've added the test Subscribe_Multiple_Topics() and everything is passing! It's been tested against Can you give more details and/or show a repo that exhibits the issue. |
thanks for replying i update my go-ipfs on Windows,it's v0.4.17 now and i write some simple code
still just for twice. MessageBox show finish 1st and 2nd topic subscribe,but no work for 3rd topic and no exception catched it's strange |
And your test passed . I'm confused |
In TestMethod it works for 4 times same code in WinForm application doesn't work, always failed in 3rd time. |
You are most likely encountering "cross thread issues". The callback/action is is run on a non-UI thread when a topic message is received. Please create a github repo that has the failing code. I will fork it and try to make it work. |
To avoid WinForm CrossThread problem i create a very simple test console app. here's the whole code:
when i use command ipfs pubsub ls there are only two topics topic_0 Thanks a lot |
Thanks, it is a nice simple example. When running the example and then doing Can you make sure that you are using the latest (v0.4.17) of go-ipfs. There's been various fixes to the pubsub logic.
|
Yes,i am sure i am using the version 0.4.17
i am so confused now |
i use another laptop computer still
can only get two topics and the test run for very long time and fail. |
I am also confused. Can you show the test log failure? |
测试名称: Subscribe_Multiple_Topics 结果 的堆栈跟踪: |
when i copy http://localhost:5001/api/v0/pubsub/sub?arg=net-ipfs-api-test-883ee247-1f0d-4e6d-a794-91ebcaca6408 http://localhost:5001/api/v0/pubsub/sub?arg=net-ipfs-api-test-aec892bb-2969-47ba-a4ab-400d69ed9522 to chrome pubsub ls shows it success,there are 3 topics as excepted for some unknown reason, the third POST request timeout. |
Interesting thing same code
works very well in a Console Application or TestProject but only can sub no more than 2 topics under WinForm or WPF project And i use HttpClient repleace WebRequest Class,it works well i can not explain |
Could it be that |
This may be of help https://github.com/dotnet/corefx/issues/2332 |
It's highly possible i will do more tests |
I'm closing this issue because you cannot show any failure. Please open another issue if you can show me a full repo the exhibits the problem. |
Using Api to execute IPFS.PubSub.Sub
we can only get no more than two topics
if we run
ipfs.pubsub.sub 111
ipfs.pubsub.sub 222
ipfs.pubsub.sub 333
ipfs.pubsub.sub 444
we can only see two of them
111 and 222
The text was updated successfully, but these errors were encountered: