Socket lib if not ready emit as promise until socket opened