summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/req.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/radius/req.c')
-rw-r--r--accel-pppd/radius/req.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c
index d688f58..27a33f2 100644
--- a/accel-pppd/radius/req.c
+++ b/accel-pppd/radius/req.c
@@ -261,8 +261,12 @@ static int make_socket(struct rad_req_t *req)
return 0;
out_err:
- close(req->hnd.fd);
- req->hnd.fd = -1;
+ if (req->hnd.tpd)
+ triton_md_unregister_handler(&req->hnd, 1);
+ else {
+ close(req->hnd.fd);
+ req->hnd.fd = -1;
+ }
return -1;
}