Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] 64-bit windows client fails to publish

Hi,

I have 32-bit and 64-bit clients built under windows, linux, and solaris with v1.3.5 libmosquitto (no threading or srv).
 
On the 64-bit windows client (only), publishing occasionally fails.  I created a C example that simply publishes 1000 messages (using new/connect/publish/disconnect/destroy).  Source here: http://pastebin.com/hK9vZ53H
 
The 32-bit windows version always publishes all 1000 messages.  The 64-bit version never publishes all 1000, it will fail to publish between 5 and 50% of the messages.
 
Looking at the server logs, for failed messages:
 
1415308846: New connection from ::1 on port 1883.
1415308846: New client connected from ::1 as mosq/Rt82I0s`3N2r3Tv]Ni (c2, k60).
1415308846: Sending CONNACK to mosq/Rt82I0s`3N2r3Tv]Ni (0)
1415308846: Socket error on client mosq/Rt82I0s`3N2r3Tv]Ni, disconnecting.
 
whereas for successful messages:
 
1415309303: New connection from ::1 on port 1883.
1415309303: New client connected from ::1 as mosq/qXCBcsXh31sp<9mjo> (c2, k60).
1415309303: Sending CONNACK to mosq/qXCBcsXh31sp<9mjo> (0)
1415309303: Received PUBLISH from mosq/qXCBcsXh31sp<9mjo> (d0, q2, r0, m1, 'topic', ... (11 bytes))
1415309303: Sending PUBREC to mosq/qXCBcsXh31sp<9mjo> (Mid: 1)
1415309303: Received PUBREL from mosq/qXCBcsXh31sp<9mjo> (Mid: 1)
1415309303: Sending PUBCOMP to mosq/qXCBcsXh31sp<9mjo> (Mid: 1)
1415309303: Received DISCONNECT from mosq/qXCBcsXh31sp<9mjo>
 
This is specific to windows - the 64-bit linux and solaris clients work as expected (all messages are published).
 
It does not appear to be server dependent, I get the same results using the pre-built Win32 Windows service, as well as test.mosquitto.org. 
 
What is the cause of the socket error that causes the server to disconnect?  Is there something wrong with my sample client (http://pastebin.com/hK9vZ53H) that demonstrates the problem?


 
Thanks!
 
JK



Back to the top