pthread_mutex_unlock(&global_lock);
- http_stream_run(hc, &sq, s);
-
- pthread_mutex_lock(&global_lock);
- subscription_unsubscribe(s);
- pthread_mutex_unlock(&global_lock);
+ if(s) {
+ http_stream_run(hc, &sq, s);
+ pthread_mutex_lock(&global_lock);
+ subscription_unsubscribe(s);
+ pthread_mutex_unlock(&global_lock);
+ }
globalheaders_destroy(gh);
tsfix_destroy(tsfix);
0);
pthread_mutex_unlock(&global_lock);
- http_stream_run(hc, &sq, s);
-
- pthread_mutex_lock(&global_lock);
- subscription_unsubscribe(s);
- pthread_mutex_unlock(&global_lock);
+ if(s) {
+ http_stream_run(hc, &sq, s);
+ pthread_mutex_lock(&global_lock);
+ subscription_unsubscribe(s);
+ pthread_mutex_unlock(&global_lock);
+ }
globalheaders_destroy(gh);
tsfix_destroy(tsfix);