Another attempt at finding & fixing a flaky test.

The last failure showed that the expectation of the test for the server to close the connection to trigger a close on the client was not met as the server was not aware of the connection at that point.

 Now, adding a write on the connection from the client to make sure the connection is completely established.