prevent updating the sockettype from leaking memory
Merge pull request #4 from oli-obk/master