mirror of
https://github.com/oxen-io/oxen-mq.git
synced 2023-12-13 21:00:31 +01:00
removed UNKNOWNCOMMAND patch (applied upstream)
This commit is contained in:
parent
d27c8f2cad
commit
846e4fe358
|
@ -1,39 +0,0 @@
|
|||
From: Jason Rhinelander <jason@imaginary.ca>
|
||||
Date: Tue, 14 Apr 2020 23:50:54 -0300
|
||||
Subject: Fix pre-1.1.0 UNKNOWNCOMMAND detection
|
||||
|
||||
1.0.5 sends just ["UNKNOWNCOMMAND"], so the detection here was broken,
|
||||
which resulted in a warning rather than just a debug log message.
|
||||
---
|
||||
lokimq/proxy.cpp | 13 ++++++-------
|
||||
1 file changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/lokimq/proxy.cpp b/lokimq/proxy.cpp
|
||||
index bbd7517..4672ccc 100644
|
||||
--- a/lokimq/proxy.cpp
|
||||
+++ b/lokimq/proxy.cpp
|
||||
@@ -560,18 +560,17 @@ bool LokiMQ::proxy_handle_builtin(size_t conn_index, std::vector<zmq::message_t>
|
||||
else if (is_error_response(cmd)) {
|
||||
// These messages (FORBIDDEN, UNKNOWNCOMMAND, etc.) are sent in response to us trying to
|
||||
// invoke something that doesn't exist or we don't have permission to access. These have
|
||||
- // two forms (the latter is only sent by remotes running 1.0.6+).
|
||||
+ // two forms (the latter is only sent by remotes running 1.1.0+).
|
||||
// - ["XXX", "whatever.command"]
|
||||
// - ["XXX", "REPLY", replytag]
|
||||
// (ignoring the routing prefix on incoming commands).
|
||||
// For the former, we log; for the latter we trigger the reply callback with a failure
|
||||
|
||||
- if (parts.size() == (2 + incoming) && is_error_response(view(parts[1 + incoming]))) {
|
||||
- // Something like ["UNKNOWNCOMMAND", "FORBIDDEN_SN"] which can happen because the remote
|
||||
- // is running an older version that didn't understand the FORBIDDEN_SN (or whatever)
|
||||
- // error reply that we sent them. We just ignore it because anything else could trigger
|
||||
- // an infinite cycle.
|
||||
- LMQ_LOG(debug, "Received [", cmd, ",", view(parts[1 + incoming]), "]; remote is probably an older lokimq. Ignoring.");
|
||||
+ if (parts.size() == (1 + incoming) && cmd == "UNKNOWNCOMMAND") {
|
||||
+ // pre-1.1.0 sent just a plain UNKNOWNCOMMAND (without the actual command); this was not
|
||||
+ // useful, but also this response is *expected* for things 1.0.5 didn't understand, like
|
||||
+ // FORBIDDEN_SN: so log it only at debug level and move on.
|
||||
+ LMQ_LOG(debug, "Received plain UNKNOWNCOMMAND; remote is probably an older lokimq. Ignoring.");
|
||||
return true;
|
||||
}
|
||||
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -1,2 +1 @@
|
|||
0002-Fully-version-library.patch
|
||||
0002-Fix-pre-1.1.0-UNKNOWNCOMMAND-detection.patch
|
||||
|
|
Loading…
Reference in a new issue