X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FReadWritePolicy.cc;h=4b4362571658b86b153bd44ef8063bf8063e802a;hb=410b5d6536361b7a7376c38efee92263e793fea4;hp=30fcbf7119436a70b04f69cc736d705136fe32df;hpb=31d85cd6b8e03c5ecc924ca8892906be1bab702f;p=senf.git diff --git a/Socket/ReadWritePolicy.cc b/Socket/ReadWritePolicy.cc index 30fcbf7..4b43625 100644 --- a/Socket/ReadWritePolicy.cc +++ b/Socket/ReadWritePolicy.cc @@ -91,6 +91,12 @@ prefix_ unsigned senf::WriteablePolicy::do_write(FileHandle handle, char const * case EINTR: break; case EAGAIN: + case ECONNREFUSED: + // Writing to a UDP socket seems return this error code if a corresponding ICMP + // error code has been received before (at least on linux). This is inconsistent + // since I cannot rely on getting ECONNREFUSED. I therefore ignore this error. TCP + // sockets will return this error on connect() and not on write(). Therefore we can + // unconditionally ignore this error here. rv = 0; break; default: @@ -133,4 +139,5 @@ prefix_ unsigned senf::WriteablePolicy::do_writeto(FileHandle handle, // indent-tabs-mode: nil // ispell-local-dictionary: "american" // compile-command: "scons -u test" +// comment-column: 40 // End: