fix: check if the socket is getting opened

fixes #1