The call to docker.events() just halts and waits indefinetely. The reading of the response is probably not done correctly. Let's try to fix it.