Break gss_get_conn_ctx() into two functions, on that retrieves a context, and one that creates a new one.  Make corresponding changes in both modules.
Include connection keep-alive