AlexsJones / whisper-core

Core library for whisper secure domain P2P chat
http://alexsjones.github.io/whisper-core/
1 stars 3 forks source link

listen_for_socket_fd in secure_comms fails with bind error when you try to initiate session the second time #13

Closed draganglumac closed 9 years ago

draganglumac commented 9 years ago

We have a major priority issue with trying to initiate the session twice from the same peer. The auth comms calls listen_for_socket_fd when you hit the SC_RECEIVER block (secure_comms.c line 130) so when you initiate the next session it bombs out with cannot bind error.

To reproduce just 1) Initiate session from peer A to peer B, A initiator and B receiver 2) send a couple of messages 3) quite chats (from either A or B) 4) initiate another session but again make A initiatior and B receiver 5) you get bind error on A side and connect error eventually on B side

AlexsJones commented 9 years ago

Okay ill look at this. I'm not too worried, I had actually neglected to finish any clean up on secure comms What we need is secure_comms_end() or something similar after all states to close sockets. I'll get it done this weekend.

AlexsJones commented 9 years ago

For my use img

draganglumac commented 9 years ago

No worries amigo. I've done a small fix for the CLI too which I'll push shortly

Sent from my iPhone

On 18 Apr 2015, at 10:17, Alex Jones notifications@github.com wrote:

Okay ill look at this. I'm not too worried, I had actually neglected to finish any clean up on secure comms What we need is secure_comms_end() or something similar after all states to close sockets. I'll get it done this weekend.

— Reply to this email directly or view it on GitHub.

AlexsJones commented 9 years ago

I have not been able to repo this, though is this because of the CLI fix?