THRIFT-5121: Fix inverted logic when testing message type
Client: Swift
Patch: Alexander Edge
This closes #2036
diff --git a/lib/swift/Sources/TMultiplexedProcessor.swift b/lib/swift/Sources/TMultiplexedProcessor.swift
index 661d4a7..7f40808 100644
--- a/lib/swift/Sources/TMultiplexedProcessor.swift
+++ b/lib/swift/Sources/TMultiplexedProcessor.swift
@@ -58,7 +58,7 @@
public func process(on inProtocol: TProtocol, outProtocol: TProtocol) throws {
let message = try inProtocol.readMessageBegin()
- guard message.1 != .call && message.1 != .oneway else { throw Error.incompatibleMessageType(message.1) }
+ guard message.1 == .call || message.1 == .oneway else { throw Error.incompatibleMessageType(message.1) }
if let separatorIndex = message.0.firstIndex(of: Character(.multiplexSeparator)) {
let serviceName = String(message.0.prefix(upTo: separatorIndex))
let messageName = String(message.0.suffix(from: message.0.index(after: separatorIndex)))