aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2019-02-04 09:27:10 +0100
committerPřemysl Janouch <p@janouch.name>2019-02-04 09:27:10 +0100
commit95f183aa480733d7f7f4221e91df4570433c2e89 (patch)
treeb3ba657e4acd2dc2e174f868669e27918c71cb5a
parente7ea35f3045f502ecff2c6d8f4a60e46dde6c1df (diff)
downloadhaven-95f183aa480733d7f7f4221e91df4570433c2e89.tar.gz
haven-95f183aa480733d7f7f4221e91df4570433c2e89.tar.xz
haven-95f183aa480733d7f7f4221e91df4570433c2e89.zip
hpcu: eliminate infinite looping
-rw-r--r--hpcu/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hpcu/main.go b/hpcu/main.go
index 3aebb62..3508f63 100644
--- a/hpcu/main.go
+++ b/hpcu/main.go
@@ -92,7 +92,7 @@ func getProperty(window xproto.Window, property xproto.Atom) (
// chunking the requests. This has a cost of losing atomicity, although
// it shouldn't pose a problem except for timeout-caused INCR races.
var result xproto.GetPropertyReply
- for result.Length == 0 || result.BytesAfter > 0 {
+ for (result.Sequence == 0 && result.Length == 0) || result.BytesAfter > 0 {
reply, err := xproto.GetProperty(X, false, /* delete */
window, property, xproto.GetPropertyTypeAny,
uint32(len(result.Value))/4,