port has to be closed and deleted in the same thread as it was created. changed the disconnect function
Attach a file by drag & drop or click to upload