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