summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/socketengine_iocp.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/socketengine_iocp.cpp b/src/socketengine_iocp.cpp
index 9070f4d49..bab328660 100644
--- a/src/socketengine_iocp.cpp
+++ b/src/socketengine_iocp.cpp
@@ -68,7 +68,16 @@ bool IOCPEngine::AddFd(EventHandler* eh)
WantWrite(eh);
// we're all good =)
- m_binding.insert( map<int, EventHandler*>::value_type( eh->GetFd(), eh ) );
+ try
+ {
+ m_binding.insert( map<int, EventHandler*>::value_type( eh->GetFd(), eh ) );
+ }
+ catch (...)
+ {
+ /* Ohshi-, map::insert failed :/ */
+ return false;
+ }
+
return true;
}