public void ReturnConnection(MqttClientConnection clientConnection) { try { clientConnection.ResetSocket(); } catch (Exception) { } clientConnection.Reset(); Interlocked.Increment(ref numberOfConnectionsReturned); unconnectedClientPool.Push(clientConnection); }