core: fix: socket check, tls scheme, QUIT msg
core: fix: socket check, tls scheme, QUIT msg

Former-commit-id: a6c88017b460d68775cf826266a5ed4d3c42ace5
Former-commit-id: 458a358358599ca376c1d3c7387c59226b10e3e7
torhve/ivar2,torhve/ivar2,haste/ivar2,torhve/ivar2