Skip to content
Snippets Groups Projects
Commit e55e1833 authored by chai2010's avatar chai2010
Browse files

fix build on windows

parent 478f55fe
No related branches found
No related tags found
No related merge requests found
...@@ -243,6 +243,9 @@ static void on_accept(void *arg, int from_iocp) { ...@@ -243,6 +243,9 @@ static void on_accept(void *arg, int from_iocp) {
SOCKET sock = sp->new_socket; SOCKET sock = sp->new_socket;
grpc_winsocket_callback_info *info = &sp->socket->read_info; grpc_winsocket_callback_info *info = &sp->socket->read_info;
grpc_endpoint *ep = NULL; grpc_endpoint *ep = NULL;
DWORD transfered_bytes;
DWORD flags;
BOOL wsa_success;
/* The general mechanism for shutting down is to queue abortion calls. While /* The general mechanism for shutting down is to queue abortion calls. While
this is necessary in the read/write case, it's useless for the accept this is necessary in the read/write case, it's useless for the accept
...@@ -251,9 +254,8 @@ static void on_accept(void *arg, int from_iocp) { ...@@ -251,9 +254,8 @@ static void on_accept(void *arg, int from_iocp) {
/* The IOCP notified us of a completed operation. Let's grab the results, /* The IOCP notified us of a completed operation. Let's grab the results,
and act accordingly. */ and act accordingly. */
DWORD transfered_bytes = 0; transfered_bytes = 0;
DWORD flags; wsa_success = WSAGetOverlappedResult(sock, &info->overlapped,
BOOL wsa_success = WSAGetOverlappedResult(sock, &info->overlapped,
&transfered_bytes, FALSE, &flags); &transfered_bytes, FALSE, &flags);
if (!wsa_success) { if (!wsa_success) {
if (sp->shutting_down) { if (sp->shutting_down) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment