Bugfix in connection

Fixed a datastore connection bug where connection would (sometimes) return without listening to the full response from the datastore .