pw->stopped = TRUE;
silc_cond_broadcast(pw->wait_cond);
silc_mutex_unlock(pw->wait_lock);
+ silc_thread_yield();
/* Re-acquire lock and free resources */
silc_mutex_lock(pw->wait_lock);
SilcPacketWrapperStream pws = stream;
SilcBool ret = FALSE;
- /* Call decoder if set */
+ /* Call encoder if set */
if (pws->coder) {
silc_buffer_reset(pws->encbuf);
ret = pws->coder(stream, SILC_STREAM_CAN_WRITE, pws->encbuf,