int packetlen, paddedlen, mac_len = 0;
int block_len = cipher ? silc_cipher_get_block_len(cipher) : 0;
bool cont = TRUE;
+
+ /* Do not process for disconnected connection */
+ if (SILC_IS_DISCONNECTED(sock))
+ return;
if (sock->inbuf->len < SILC_PACKET_MIN_HEADER_LEN)
return;