Fix client socket
Add async tests