avoid exceptions when DicomServer is closed (@mdubey82)