X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspsocket.cpp;h=89c3a71a93a691850b70b882f5db0fddb8db8679;hb=63aa8d0d42f619c52d382bde3e6ba2e5e23b12ac;hp=436cbb6bb9a24f85af959c05000a112ba6055bc7;hpb=d0556a2a598e207ab468b7ea4543e427205ef903;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 436cbb6bb..89c3a71a9 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -201,28 +201,12 @@ void StreamSocket::DoWrite() if (GetIOHook()) { - { - { - { - int rv = GetIOHook()->OnStreamSocketWrite(this); - if (rv > 0) - { - // consumed the entire string, and is ready for more - } - else if (rv == 0) - { - // socket has blocked. Stop trying to send data. - // IOHook has requested unblock notification from the socketengine - return; - } - else - { - SetError("Write Error"); // will not overwrite a better error message - return; - } - } - } - } + int rv = GetIOHook()->OnStreamSocketWrite(this); + if (rv < 0) + SetError("Write Error"); // will not overwrite a better error message + + // rv == 0 means the socket has blocked. Stop trying to send data. + // IOHook has requested unblock notification from the socketengine. } else {