fixed the concurrency issue (global sock var -> bad idea my very young padawan)