Merge "Add support for cancelling connection"