forked from pool/tigervnc
35fddca831
* Multi-threaded decoder in the FLTK viewer * Improved SSH integration in the Java viewer * Fine grained lock down of Xvnc parameters * Compatibility with Xorg 1.18 * Lots of packaging fixes * Better compatibility with Vino, both in the FLTK and Java viewer - Removed patches: * U_add_allowoverride_parameter.patch * U_include-vencrypt-only-if-any-subtype-present.patch * U_tigervnc_clear_up_zlibinstream_reset_behaviour.patch * u_xserver118.patch OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=96
27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
Author: Michal Srb <msrb@suse.com>
|
|
Subject: Ignore EPIPE on write.
|
|
Patch-Mainline: To be upstreamed
|
|
References: bnc#864676
|
|
|
|
If the VNC server closes connection after our last read and before this write, we will report error message about EPIPE.
|
|
This situation is no error, however, we should quit normally same as when we find out that connection was closed during read.
|
|
Index: common/rdr/FdOutStream.cxx
|
|
===================================================================
|
|
--- common/rdr/FdOutStream.cxx.orig
|
|
+++ common/rdr/FdOutStream.cxx
|
|
@@ -191,8 +191,12 @@ int FdOutStream::writeWithTimeout(const
|
|
n = ::write(fd, data, length);
|
|
} while (n < 0 && (errno == EINTR));
|
|
|
|
- if (n < 0)
|
|
- throw SystemException("write", errno);
|
|
+ if (n < 0) {
|
|
+ if(errno == EPIPE)
|
|
+ n = length; // Ignore EPIPE and fake successfull write, it doesn't matter that we are writing to closed socket, we will find out once we try to read from it.
|
|
+ else
|
|
+ throw SystemException("write", errno);
|
|
+ }
|
|
|
|
gettimeofday(&lastWrite, NULL);
|
|
|