Skip to content

Commit adc2019

Browse files
Requesthandler ignore missing devices logging (#2749)
Co-authored-by: Sebastian Petersen <[email protected]>
1 parent 524c94e commit adc2019

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pymodbus/server/requesthandler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ async def handle_request(self):
9797
response = await self.last_pdu.update_datastore(context)
9898

9999
except NoSuchIdException:
100-
Log.error("requested device id does not exist: {}", self.last_pdu.dev_id)
101100
if self.server.ignore_missing_devices:
101+
Log.debug("ignoring request for unknown device id: {}", self.last_pdu.dev_id)
102102
return # the client will simply timeout waiting for a response
103+
Log.error("requested device id does not exist: {}", self.last_pdu.dev_id)
103104
response = ExceptionResponse(self.last_pdu.function_code, ExcCodes.GATEWAY_NO_RESPONSE)
104105
except Exception as exc: # pylint: disable=broad-except
105106
Log.error(

0 commit comments

Comments
 (0)