To close a proxy you should terminate the context. Same behavior as libzmq:
https://github.com/zeromq/libzmq/blob/master/src/proxy.cpp