I think you could use here sock.get_once(2000, 5) <== notice get_once allows you to provide the timeout.

Any reason to not use ger_once here?