The problem is solved.
When we create the master we can see a paramer keepalive in the constructor.
ModbusMaster master = modbusFactory.createTcpMaster(ipParameters, keepalive);
I was keepalive=false. If keepalive = false then every time that the client (master) read of the server (slave) the socket is open------close.
If keepalive = true then the master close the socket at the end of all the readings. But I do not know how the keepalive works exactly, is it parametrizable...
Do you know How the keepalive works exactly? And Where Can I find Modbus4j documentation?
Best regards.