wait and retry if the server state is "upgrading" when calling NextWriter.
This is a fix to https://github.com/googollee/go-socket.io/issues/52