jwtproxy
jwtproxy copied to clipboard
Clean up socket on shutdown
Right now if jwtproxy shuts itself down (because it can't publish a key, for example), it leaves the socket it was listening on behind, which causes an error when it restarts later. (Right now I'm manually cleaning it up in the init file)
Also I noticed that we're calling close on the file descriptor rather then on the "socket" object (which does a tiny bit of additional cleanup)
Since this issue exits for long time, hope it will be fixed soon. time="2020-02-29T10:01:52Z" level=error msg="Failed to start reverse proxy: listen unix /tmp/jwtproxy_secscan.sock: bind: address already in use"