Also, there's probably no reason for you to even have max_sockets - that was only for triggering reallocating a C array in Cython