diff --git a/librdmacm/rsocket.c b/librdmacm/rsocket.c index ae26efd2e..e71677ebc 100644 --- a/librdmacm/rsocket.c +++ b/librdmacm/rsocket.c @@ -4652,8 +4652,11 @@ static void *cm_svc_run(void *arg) fds[i].revents = 0; poll(fds, svc->cnt + 1, -1); - if (fds[0].revents) + if (fds[0].revents) { cm_svc_process_sock(svc); + /* svc->contexts may have been reallocated, so need to assign again */ + fds = svc->contexts; + } for (i = 1; i <= svc->cnt; i++) { if (!fds[i].revents)