Skip to content
This repository was archived by the owner on Apr 6, 2019. It is now read-only.

Commit a72f818

Browse files
committed
fix windows io_service: set the io_state to IO_OP_READ in async_read
1 parent 49d766d commit a72f818

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sources/network/windows/io_service.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ io_service::async_read(SOCKET sock, std::vector<char>& buffer, std::size_t read_
122122
//We need a new overlapped struct for EACH overlapped operation.
123123
//we reuse them over and over.
124124
io_context_info* p_io_info = sockinfo.get_pool_io_context();
125+
p_io_info->eOperation = IO_OP_READ;
125126

126127
int nRet = WSARecv(sock, &buffRecv, 1, &dwRecvNumBytes, &dwFlags, &(p_io_info->overlapped), NULL);
127128

0 commit comments

Comments
 (0)