Handling of RST as per RFC793 is not safe in terms of protection against "Blind Reset Attack". See the RFC 5961 (3.2) for details:
https://tools.ietf.org/html/rfc5961#section-3
In short, implementation should reset connection only if the SEQ of RST packet equals to RCV.NXT. For other in-window cases special challenge-ack procedure should be performed.