Fixed an issue in the ConnectionHandler class where the connection was b...

...eing created twice. Also, added a function that gets the current depth of a queue