catch serial port exceptions
autoremove socket and handler when connection is broken