title: Microsoft Azure IoT hub (java) notifies a "Lost connection to the server. Reconnecting 0 time." after sending a message
body: <p>I use the IoT Hub Java library to send messages between my devices and Microsoft Azure. </p>
  
  <p>To connect I call</p>
  
  <pre><code>client = new DeviceClient(connString, protocol);
  client.open();
  </code></pre>
  
  <p>And then, to send a message I call </p>
  
  <pre><code>client.sendEventAsync(message, callback, lockobj);
  </code></pre>
  
  <p>Then, my <code>callback</code> function is called when the message is sent. </p>
  
  <p>However, and here is the problem, after calling <code>sendEventAsync</code> on my terminal appears infinitly the message <code>Lost connection to the server. Reconnecting 0 time.</code></p>
  
  <p>I've tried to close the connection after send the message and reopen it each time, but I think it's worst and the problem persists. Moreover, I've executed the test sample given by Azure (<a href="https://github.com/Azure-Samples/azure-iot-samples-java/archive/master.zip" rel="nofollow noreferrer">https://github.com/Azure-Samples/azure-iot-samples-java/archive/master.zip</a>) and I have the same problem.</p>
  
  <p>So my question is, is there a problem with the library (since the problem is present even with its code)? Or am I doing something wrong?</p>
  
  <p>Thanks a lot!</p>