fix Socket#end()