httpgw needs polishing, MIME types
[swift-upb.git] / channel.cpp
index f6d52b8..d8838e1 100644 (file)
@@ -118,6 +118,8 @@ bool    swift::Listen3rdPartySocket (socket_callbacks_t cb) {
         else
             Channel::socket_count++;
     Channel::sockets[i]=cb;
+    if (!cb.may_read && !cb.may_write && !cb.on_error)
+        Channel::sockets[i] = Channel::sockets[--Channel::socket_count];
     return true;
 }