pyvisa / pyvisa-py

A pure python PyVISA backend
https://pyvisa-py.readthedocs.io
MIT License
288 stars 124 forks source link

RPC connection error is shadowed #325

Open adriengcql opened 2 years ago

adriengcql commented 2 years ago

WHAT Attempting a failing RPC connection throws OSError: [WinError 10038] An operation was attempted on something that is not a socket

EXPECTED It should throw RPCError: can't connect to server (from this line

WHY See protocols.rpc._connect: in case there is an Exception, sock.setblocking(1) is called after sock.close()

MatthieuDartiailh commented 2 years ago

Indeed that looks like a problem. Can you make a PR ?