[fix] apigenlib:  Arrange to retain socket between calls.