I think this should be inside an

[code]
if (!listensock)
[/code]