fix bug for sessionDidDisconnect

Reproduced the bug from #73 and implemented the solution by emptying the array after the for loop. Now the bug does not occur with multiple subscribers.