Browse Source

修改bug

yjp 1 year ago
parent
commit
4b1ccf9c57
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mqtt_binding/mqtt_binding.go

+ 1 - 1
mqtt_binding/mqtt_binding.go

@@ -91,7 +91,7 @@ func (item *BindItem[I, O]) bind(r *router.Router, bindingResponseIdentifier res
 		var inputModel I
 
 		// 请求的结构类型不为any
-		if inputType != nil {
+		if responseIdentifier != nil || inputType != nil {
 			// 将请求数据解析到inputModel中
 			if item.OptionalBindingFunc != nil {
 				ok := item.OptionalBindingFunc(mqttClientInstance, routerItem, &inputModel, item.ResponseFunc)