memory leak in server loop
Merge pull request #382 from Incubaid/fix_memleak_1.6

memory leak in server loop