@@ -114,7 +114,7 @@ fn start_method_handler_thread(
114
114
// notify the connection dealing main thread to stop.
115
115
control_tx
116
116
. send ( ( ) )
117
- . unwrap_or_else ( |err| debug ! ( "Failed to send {:?}" , err) ) ;
117
+ . unwrap_or_else ( |err| trace ! ( "Failed to send {:?}" , err) ) ;
118
118
break ;
119
119
}
120
120
result = read_message ( fd) ;
@@ -124,7 +124,7 @@ fn start_method_handler_thread(
124
124
// notify the connection dealing main thread to stop.
125
125
control_tx
126
126
. send ( ( ) )
127
- . unwrap_or_else ( |err| debug ! ( "Failed to send {:?}" , err) ) ;
127
+ . unwrap_or_else ( |err| trace ! ( "Failed to send {:?}" , err) ) ;
128
128
break ;
129
129
}
130
130
@@ -133,7 +133,7 @@ fn start_method_handler_thread(
133
133
trace ! ( "notify client handler to create much more worker threads!" ) ;
134
134
control_tx
135
135
. send ( ( ) )
136
- . unwrap_or_else ( |err| debug ! ( "Failed to send {:?}" , err) ) ;
136
+ . unwrap_or_else ( |err| trace ! ( "Failed to send {:?}" , err) ) ;
137
137
}
138
138
139
139
let mh;
@@ -152,7 +152,7 @@ fn start_method_handler_thread(
152
152
// have exited.
153
153
control_tx
154
154
. send ( ( ) )
155
- . unwrap_or_else ( |err| debug ! ( "Failed to send {:?}" , err) ) ;
155
+ . unwrap_or_else ( |err| trace ! ( "Failed to send {:?}" , err) ) ;
156
156
trace ! ( "Socket error send control_tx" ) ;
157
157
break ;
158
158
}
@@ -180,17 +180,16 @@ fn start_method_handler_thread(
180
180
// exited.
181
181
control_tx
182
182
. send ( ( ) )
183
- . unwrap_or_else ( |err| debug ! ( "Failed to send {:?}" , err) ) ;
183
+ . unwrap_or_else ( |err| trace ! ( "Failed to send {:?}" , err) ) ;
184
184
break ;
185
185
}
186
186
continue ;
187
187
}
188
188
trace ! ( "Got Message request {:?}" , req) ;
189
189
190
190
let path = format ! ( "/{}/{}" , req. service, req. method) ;
191
- let method;
192
- if let Some ( x) = methods. get ( & path) {
193
- method = x;
191
+ let method = if let Some ( x) = methods. get ( & path) {
192
+ x
194
193
} else {
195
194
let status = get_status ( Code :: INVALID_ARGUMENT , format ! ( "{} does not exist" , path) ) ;
196
195
let mut res = Response :: new ( ) ;
@@ -203,11 +202,11 @@ fn start_method_handler_thread(
203
202
// exited.
204
203
control_tx
205
204
. send ( ( ) )
206
- . unwrap_or_else ( |err| debug ! ( "Failed to send {:?}" , err) ) ;
205
+ . unwrap_or_else ( |err| trace ! ( "Failed to send {:?}" , err) ) ;
207
206
break ;
208
207
}
209
208
continue ;
210
- }
209
+ } ;
211
210
let ctx = TtrpcContext {
212
211
fd,
213
212
mh,
@@ -223,7 +222,7 @@ fn start_method_handler_thread(
223
222
// exited.
224
223
control_tx
225
224
. send ( ( ) )
226
- . unwrap_or_else ( |err| debug ! ( "Failed to send {:?}" , err) ) ;
225
+ . unwrap_or_else ( |err| trace ! ( "Failed to send {:?}" , err) ) ;
227
226
break ;
228
227
}
229
228
}
0 commit comments