unblock msgsendv

I have a multi-threaded app, with sender and receiver threads. Sender does name_open and then blocks in msgsendv. Receiver
does name_attach, but has not yet done msgreceive.

Problem happens when I try to shutdown the sender thread. Main
thread calls ConnectDetach with the coid of name_open, but msgsendv
doesn’t unblock.

According to the docs, ConnectDetach should unblock all threads waiting
in MsgSendv. What am I doing wrong? Thanks.

Yes but not when the connection is done with name_open ( I think ) . I’m actually surprise name_open returned if the received has done any msgreceive, because when using name_open extra messages are sent to the server ( through gns ).

I tried replacing name_attach/name_open with ChannelCreate/ConnectAttach - same result.

A possible solution might be for main thread to call ConnectServerInfo, get the chid for the channel,
and then do a MsgReceive (kind of a round-about method, but it might work).

I don`t recall but I beleive you need certain flags to be there ( or not be there ) when you do the ChannelCreate. I remember I had to do some digging, that was a while back ;-)