That already look really good
In the timer I would move the "if connections[i].sock.lasterror <> 0 then" block after the "if ConnectionS[i].sock.canread(100)" block so that first the if canread is done. And if that has an error the "sock.lasterror <> 0" will catch it and close the connection.
the server gets message from the clients but when i close one of the client program i get the sig error message.
Yes, that's because you correctly dispose of the socket with sock.Free; when the connection is lost. But now you still have a Connections[i].sock with a invalid socket. That's why you get the error. The second pass of the timer checks that invalid connection.
Remember how to do the removal of an item from the array? You don't need Connections[i] anymore so you have to remove it from the array and move all socket after it one up in the array and make the length of the array 1 less.