fixed crash on succesful socket connection
some socket fixes
Merge branch 'master' of https://github.com/bartolkaruza/capo