fix whitespace
stop server from continued polling after socket is closed, fixes #333