Hi @thsieh123 ,
It appears that you have two slots, one is "Production" (default slot) and "devel". Looking at the details provided, devel and production has separate code bases.
Your main concern is "It seems that the "devel" slot has been executed when client connects to the function app"
This would happen if the IOThub triggered function present in the devel slot has been called by the client or if you have performed a slot swap. During a slot swap, the code/ app settings would be swapped from devel slot to production slot .
If you havent swapped the slots, then you will have to check if the client is targetting the production slot's function app
By default, all the requests/triggers would execute the production slot's function, there is no need to stop the devel slot. Again, I would suggest you to check the client side or also take a look at the integration page of the Production slot's function app and check if the trigger and bindings section has been mapped to correct IOThub resource name
Here are the use cases for deployment slots
https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-slots#why-use-slots
Please let me know if you are still facing the issue. I will be able to help you further.
I hope this helps!
Also please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.