File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -98,28 +98,15 @@ impl v2::HostConnection for OutboundMqtt {
98
98
. map_err ( other_error) ?;
99
99
100
100
// Poll event loop until outgoing publish event is iterated over to send the message to MQTT broker or capture/throw error.
101
- // We may revisit this later to manage long running connections and their issues in the connection pool.
101
+ // We may revisit this later to manage long running connections, high throughput use cases and their issues in the connection pool.
102
102
loop {
103
103
let event = eventloop
104
104
. poll ( )
105
105
. await
106
106
. map_err ( |err| v2:: Error :: ConnectionFailed ( err. to_string ( ) ) ) ?;
107
107
108
- match event {
109
- rumqttc:: Event :: Outgoing ( outgoing_event) => {
110
- match outgoing_event {
111
- rumqttc:: Outgoing :: Publish ( _) => {
112
- return Ok ( ( ) ) ;
113
- }
114
- _ => {
115
- // We don't care about other outgoing event types in this loop check.
116
- continue ;
117
- }
118
- }
119
- }
120
- rumqttc:: Event :: Incoming ( _) => {
121
- // We don't care about incoming event types in this loop check.
122
- }
108
+ if let rumqttc:: Event :: Outgoing ( rumqttc:: Outgoing :: Publish ( _) ) = event {
109
+ return Ok ( ( ) ) ;
123
110
}
124
111
}
125
112
}
You can’t perform that action at this time.
0 commit comments