ran into something like this before, trying to handle client and server through a web api at the same time. Splitting them into separate context objects worked for me too after some trial and error. glad you got it sorted!
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferencesStable Releases - download stable product releases.
Development Branch - latest development branch on GitHub.
wolfSSL Manual - wolfSSL (formerly CyaSSL) product manual and API reference.