we discussed similar issue some days ago
possibly it worth to add your request as input to #6389 - fix will be done in this area - at least error will be visible and may be it will be possible to handle it in code
I had simular situation with connect(). Because fix will be done in 0.15.+ but I am using 0.14.1 I added fixed implementation to own code
I can guess (because timeout) that you use blocked sockets.
For this case temporary solution will be replacement sendmsg() with loop of send() (clear disconnect errors)