Permalink
Browse files

fix iocp bug

Signed-off-by: yayanyang <yayanyang@gmail.com>
  • Loading branch information...
1 parent 7d54397 commit 8f21ec9aaefab38d5eb0c8fb7a6970d5f3de2b17 yayanyang committed Sep 25, 2012
Showing with 12 additions and 4 deletions.
  1. +3 −1 io/io_service_iocp.cpp
  2. +9 −3 io/socket_iocp.cpp
View
@@ -75,9 +75,11 @@ namespace lemon{namespace io{namespace core{
{
if(!PostQueuedCompletionStatus(_completionPort,0,LEMON_IOCP_EXIT,NULL))
{
- scope_error_info errorCode;
+ error_info errorCode;
LEMON_WIN32_ERROR(errorCode,GetLastError());
+
+ errorCode.check_throw();
}
}
}
View
@@ -28,9 +28,11 @@ namespace lemon{namespace io{namespace core{
NULL,
NULL))
{
- scope_error_info errorCode;
+ error_info errorCode;
LEMON_WIN32_ERROR(errorCode,GetLastError());
+
+ errorCode.check_throw();
}
return fn;
@@ -41,9 +43,11 @@ namespace lemon{namespace io{namespace core{
{
if(INVALID_SOCKET == handle())
{
- scope_error_info errorCode;
+ error_info errorCode;
LEMON_WIN32_ERROR(errorCode,GetLastError());
+
+ errorCode.check_throw();
}
try
@@ -59,9 +63,11 @@ namespace lemon{namespace io{namespace core{
if(SOCKET_ERROR == status)
{
- scope_error_info errorCode;
+ error_info errorCode;
LEMON_WIN32_ERROR(errorCode,GetLastError());
+
+ errorCode.check_throw();
}
}

0 comments on commit 8f21ec9

Please sign in to comment.