steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
277 stars 110 forks source link

Fix TCPConnectionHandler thread interruptions #4

Closed martentamerius closed 8 years ago

martentamerius commented 8 years ago

Fixed the TCPConnectionHandler's infinite loop to be able to stop when the current thread is being interrupted. Also removed an unnecessary try/catch block because connection.close() already catches exceptions.

martentamerius commented 8 years ago

Note: this pull request was using the wrong line endings. Will first correct that and then issue a new pull request.