set wsaInitialized to true on success in Java_java_net_Socket_init

This commit is contained in:
Joel Dice 2010-09-13 19:50:24 -06:00
parent 66280458c8
commit 76132bec90

View File

@ -29,6 +29,8 @@ Java_java_net_Socket_init(JNIEnv* ONLY_ON_WINDOWS(e), jclass)
int r = WSAStartup(MAKEWORD(2, 2), &data);
if (r or LOBYTE(data.wVersion) != 2 or HIBYTE(data.wVersion) != 2) {
throwNew(e, "java/io/IOException", "WSAStartup failed");
} else {
wsaInitialized = true;
}
}
#endif