handle previous socket and unexpected messages for extend/gun#19

handle previous socket and unexpected messages for extend/gun#19