I was facing a connection problem where connecting to a MQTT server in localhost was working fine, but when I tried to connect to a remote MQTT server, I was getting socket timeout. I discovered that the Socket Timeout parameter must be in milliseconds, so the default value should be 15000 and not 15.
So, connecting to a remote server it was taking more than 15 milliseconds, when I changed the socket timeout value to 15000 (15 seconds) it connectto immediately.
My suggestion is to change the default value to 15000.
https://github.com/gmag11/MQTT-MQL5-Library/blob/b281acf03adeb959111d4a38d6e20aa851af228e/PubSubClient.mqh#L64
I was facing a connection problem where connecting to a MQTT server in localhost was working fine, but when I tried to connect to a remote MQTT server, I was getting socket timeout. I discovered that the Socket Timeout parameter must be in milliseconds, so the default value should be 15000 and not 15.
So, connecting to a remote server it was taking more than 15 milliseconds, when I changed the socket timeout value to 15000 (15 seconds) it connectto immediately.
My suggestion is to change the default value to 15000.